lasthourcloud/app/Http/Livewire/Server/Show.php

26 lines
656 B
PHP
Raw Normal View History

2023-08-29 12:36:17 +00:00
<?php
namespace App\Http\Livewire\Server;
use App\Models\Server;
2023-08-29 13:51:30 +00:00
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
2023-08-29 12:36:17 +00:00
use Livewire\Component;
class Show extends Component
{
2023-08-29 13:51:30 +00:00
use AuthorizesRequests;
2023-08-29 12:36:17 +00:00
public ?Server $server = null;
public function mount()
{
2023-08-29 13:51:30 +00:00
try {
$this->server = Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail();
} catch (\Throwable $e) {
return general_error_handler(err: $e, that: $this);
}
2023-08-29 12:36:17 +00:00
}
public function render()
{
return view('livewire.server.show');
}
}