user = auth()->user(); } public function render() { $query = Payment::query() ->with('type', 'client') ->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc') ->paginate($this->per_page); return render('components.livewire.payments-table', [ 'payments' => $query ]); } }