openIssuesCount = Issue::where('project_id', $this->project->id) ->where('status', 'open') ->count(); } #[On('issue-updated')] public function handleIssueUpdated() { $this->openIssuesCount = Issue::where('project_id', $this->project->id) ->where('status', 'open') ->count(); } #[On('issue-deleted')] public function handleIssueDeleted() { $this->openIssuesCount = Issue::where('project_id', $this->project->id) ->where('status', 'open') ->count(); } }