getLogs(); // } // public function getLogs(): void // { // $this->logs = Auth::user()->bots->pluck('logs')->flatten()->sortByDesc('created_at'); // } public function render() { return view('livewire.bot-logs', [ 'logs' => BotLog::whereHas('bot', fn($q) => $q->where('user_id', Auth::id())) ->orderBy('created_at', 'desc') ->latest() ->paginate(10), ]); } }