projects()->where('uuid', request()->route('project_uuid'))->firstOrFail(); $environment = $project->environments()->where('uuid', request()->route('environment_uuid'))->firstOrFail(); $this->service = $environment->services() ->with(['server.settings', 'environment.project']) ->where('uuid', request()->route('service_uuid')) ->firstOrFail(); $this->authorize('view', $this->service); $this->backup = ScheduledVolumeBackup::query() ->with('backupable.resource') ->where('uuid', request()->route('backup_uuid')) ->forService($this->service) ->firstOrFail(); $this->parameters = get_route_parameters(); $this->section = match (request()->route()?->getName()) { 'project.service.volume-backups.s3' => 's3', 'project.service.volume-backups.retention' => 'retention', 'project.service.volume-backups.executions' => 'executions', 'project.service.volume-backups.danger' => 'danger', default => 'general', }; } public function render(): View { return view('livewire.project.service.volume-backup.show'); } }