company->db); } public function render() { $query = RecurringInvoice::query() ->where('client_id', auth()->guard('contact')->user()->client->id) ->where('company_id', $this->company->id) ->whereNotNull('subscription_id') ->where('is_deleted', false) ->whereIn('status_id', [RecurringInvoice::STATUS_ACTIVE, RecurringInvoice::STATUS_PAUSED]) ->withTrashed() ->orderBy($this->sort_field, $this->sort_asc ? 'asc' : 'desc') ->paginate($this->per_page); return render('components.livewire.subscriptions-table', [ 'recurring_invoices' => $query, ]); } }