How can I limit the query on just one page using getEloquentQuery()
Hi. I don't need all the columns of a resource for my list page. How can I create a select() that only applies to the list page?
4 Replies
There should be a
->query()
method on the Table object.
Not sure whether Filament might apply it's own selection though.That generates this error:
An attempt was made to evaluate a closure for [Filament\Tables\Table], but [$query] was unresolvable.
I did a source dive and it seems like it should work.
I can't find any references to that method in the Tab;e docs.Solution
The proper method seems to be
Sure. Query sets the initial query. That's why you don't get it as an argument. My bad