*/ public function broadcastOn(): array { $channels = [new PrivateChannel('admin.runs')]; // Scope customer runs to their own private channel for the dashboard. $run = ProvisioningRun::query()->where('uuid', $this->runUuid)->first(); if ($run !== null && $run->subject_type === Order::class) { $customerId = $run->subject?->customer_id; if ($customerId !== null) { $channels[] = new PrivateChannel('customer.'.$customerId.'.run'); } } return $channels; } public function broadcastAs(): string { return 'StepAdvanced'; } }