company->db); } public function render() { $query = Task::query() ->where('client_id', auth('contact')->user()->client->id) ->whereNotNull('invoice_id') ->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc') ->paginate($this->per_page); return render('components.livewire.tasks-table', [ 'tasks' => $query, ]); } }