serverId = $serverId; $this->ref = $ref; } public static function modalMaxWidth(): string { return 'lg'; } public function load(DockerService $docker): void { // Re-gate the actual read (not just the opener): logs can leak secrets → operate only. abort_unless(Auth::user()?->can('operate'), 403); $server = Server::find($this->serverId); if (! $server) { $this->error = __('common.server_not_found'); $this->loaded = true; return; } try { $this->logs = $docker->logs($server, $this->ref, 200); } catch (InvalidArgumentException) { $this->error = __('docker.invalid_ref'); } catch (Throwable $e) { $this->error = $e->getMessage(); } $this->loaded = true; } public function render() { return view('livewire.modals.container-logs'); } }