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