how to access public variable in getEloquentQuery

Hello,
I am using getEloquentQuery and adding request()->buyer_id in the query and it works fine but when I use sorting it just disappears the data unless I hard code the buyer_id to the query. My question is how do I put the buyer_id in a public variable and access it in getEloquentQuery function please?
image.png
Solution
You could try fn ($livewire) but this query is also used on Edit/Create page. Best to overwrite getTableQuery() on the ListPage
Was this page helpful?