Modify the initial query when loading a table
In a Table is it possible to modify the initial query? In my case I want to only show Orders with sent = true; I don't want to see the other orders in this view.
Can I change the query on what the table is based?
Solution:Jump to solution
https://filamentphp.com/docs/3.x/panels/resources/getting-started#customizing-the-resource-eloquent-query I think this is what you are looking for.
4 Replies
Solution
https://filamentphp.com/docs/3.x/panels/resources/getting-started#customizing-the-resource-eloquent-query I think this is what you are looking for.
Filters might be the better choice here.
If you modify the BaseQuery, you will never be able to view the other entries. With the filter, you can see all entries with just one click.
You can also pass a custom query to the table itself AFAIK
I didn't want a filter on purpose. For this view I want to have a specific Basequery. A specific request from the client