storage = S3Storage::ownedByCurrentTeam()->whereUuid(request()->storage_uuid)->first(); if (! $this->storage) { abort(404); } $this->authorize('view', $this->storage); $this->currentRoute = request()->route()->getName(); $this->backupCount = ScheduledDatabaseBackup::where('s3_storage_id', $this->storage->id)->count(); } public function delete() { try { $this->authorize('delete', $this->storage); $this->storage->delete(); return redirect()->route('storage.index'); } catch (\Throwable $e) { return handleError($e, $this); } } public function render() { return view('livewire.storage.show'); } }