currentApplicationUuid = request()->route('application_uuid'); } #[Computed] public function deployments() { return ApplicationDeploymentQueue::with(['application.environment.project']) ->ownedByTeam(currentTeam()->id) ->whereIn('status', ['in_progress', 'queued']) ->orderBy('id') ->get([ 'id', 'application_id', 'application_name', 'deployment_url', 'pull_request_id', 'server_name', 'server_id', 'status', ]); } #[Computed] public function deploymentCount() { return $this->deployments->count(); } /** * Hide the counter when it would only repeat the current page's "Deploying…" indicator. */ #[Computed] public function isOnlyCurrentApplicationDeploying(): bool { return $this->currentApplicationUuid !== null && $this->deployments->every(fn ($deployment) => $deployment->application?->uuid === $this->currentApplicationUuid); } public function render() { return view('livewire.deployments-indicator'); } }