Filter On Load Or URL

Hi all

I hope someone can help.

I have a table in a livewire component ( not panel ). I have a link on another page which directs to this table page and modifies the query:
>modifyQueryUsing(function (Builder $query) {

                // If client_id is in the GET
                if (request()->filled('client_id')) {
                    $query->where('client_id', request()->input('client_id'));
                }
}


Howver when I click on the next page in the pagination it is lost.

So I wondered if there a way to save this?
OR
Have a filter (client drop down) be selected on page load).
Solution
if you yuse
multiple()
try [request()->input('client_id')] because i believe it want a array.
Was this page helpful?