['except' => ''], 'filtroEstado' => ['except' => ''], 'filtroCanal' => ['except' => ''], ]; public function updatingBusqueda(): void { $this->resetPage(); } public function updatingFiltroEstado(): void { $this->resetPage(); } public function updatingFiltroCanal(): void { $this->resetPage(); } public function verChat(int $userId): void { $conv = ChatConversation::whereHas('contact', fn($q) => $q->where('user_id', $userId)) ->orderByDesc('ultimo_mensaje_at') ->first(); if ($conv) { $this->redirect(route('chat.conversaciones') . '?conv=' . $conv->id); } } public function render() { $solicitudes = SolicitudRecarga::with('user') ->when($this->filtroEstado, fn($q) => $q->where('estado', $this->filtroEstado)) ->when($this->filtroCanal, fn($q) => $q->where('canal', $this->filtroCanal)) ->when($this->busqueda, fn($q) => $q->whereHas('user', fn($s) => $s->where('email', 'like', "%{$this->busqueda}%") ->orWhere('name', 'like', "%{$this->busqueda}%") )) ->orderByDesc('id') ->paginate(25); return view('livewire.chat.show-comprobantes', compact('solicitudes')); } }