And what is it that you need to do before returning the view?
Jul 30, 2022
11
Level 1
Query Builder -> middleware -> pagination
Hi, I don't understand how to work with data getting from query Builder to modify it. Here is something like: I get data and send to blade with pagination
$invoices = $this
->startConditions()
->select($columns)
->orderBy('invoices.id', 'desc');
return view('livewire.invoice.list', [
'invoices' => $this->invoices->paginate(10)
]);
but I need before sending to view, make something with data, something like middleware. How it works? Of course after that
'invoices' => $this->invoices->paginate(10)
must stay working
Please or to participate in this conversation.