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

26 lines
656 B
PHP
Raw Normal View History

2023-08-29 14:36:17 +02:00
<?php
namespace App\Http\Livewire\Server;
use App\Models\Server;
2023-08-29 15:51:30 +02:00
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
2023-08-29 14:36:17 +02:00
use Livewire\Component;
class Show extends Component
{
2023-08-29 15:51:30 +02:00
use AuthorizesRequests;
2023-08-29 14:36:17 +02:00
public ?Server $server = null;
public function mount()
{
2023-08-29 15:51:30 +02: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 14:36:17 +02:00
}
public function render()
{
return view('livewire.server.show');
}
}