forUser(Auth::user()) ->findOrFail($conversationId); Gate::authorize('view', $conversation); $this->selectedConversationId = $conversation->id; $this->detailsPanelOpen = false; } #[On('conversation-closed')] public function clearConversation(): void { $this->selectedConversationId = null; $this->detailsPanelOpen = false; } #[On('conversation-details-toggled')] public function toggleDetailsPanel(): void { $this->detailsPanelOpen = ! $this->detailsPanelOpen; } public function render(): View { return view('livewire.chat.chat-page'); } }