server->logs()->findOrFail($id); $this->logContent = $log->content; $this->dispatchBrowserEvent('open-modal', 'show-log'); } public function render(): View { if ($this->site) { return $this->renderSite(); } if ($this->count) { $logs = $this->server->logs()->latest()->take(10)->get(); } else { $logs = $this->server->logs()->latest()->simplePaginate(10); } return view('livewire.server-logs.logs-list', compact('logs')); } private function renderSite(): View { if ($this->count) { $logs = $this->site->logs()->latest()->take(10)->get(); } else { $logs = $this->site->logs()->latest()->simplePaginate(10); } return view('livewire.server-logs.logs-list', compact('logs')); } }