Fix styling

This commit is contained in:
Thijmen authored and github-actions[bot] committed 2024-06-10 20:43:34 +00:00
1 parent 41fb6a1fc9
commit d86274cc37
429 files changed
+5307 -2831

No files matched your search

+4
View File
@@ -10,20 +10,24 @@ class Delete extends Component
use AuthorizesRequests;
public $server;
public function delete()
{
try {
$this->authorize('delete', $this->server);
if ($this->server->hasDefinedResources()) {
$this->dispatch('error', 'Server has defined resources. Please delete them first.');
return;
}
$this->server->delete();
return redirect()->route('server.index');
} catch (\Throwable $e) {
return handleError($e, $this);
}
}
public function render()
{
return view('livewire.server.delete');