'feature_completed', 'feature_id' => $this->feature->id, 'project_id' => $this->feature->layer?->phase?->project_id, 'feature_name' => $this->feature->name, 'progress' => 100, 'message' => "Elemento '{$this->feature->name}' marcado como completado", ]; } public function broadcastOn(): array { $projectId = $this->feature->layer?->phase?->project_id; if (! $projectId) { return []; } $userIds = \App\Models\Project::find($projectId)?->users->pluck('id')->toArray() ?? []; return array_map(fn ($id) => new \Illuminate\Broadcasting\PrivateChannel("user.{$id}"), $userIds); } }