How to Customize Filament Table Queries in Laravel: Help Needed!
Hello everyone, I hope this isn't a repeated or silly question. I've tried various searches but couldn't find the result I was hoping for.
I have a table connected to a Laravel model, but the data I want to display in the Filament table is completely customized compared to the classic ->get()->all() that I believe Filament uses by default. To clarify, in my GridJobImportResource resource, I'd like the default query to be this:
--- Query in the comment below ---
(It's still static in some parts, but it works, so for testing purposes, it's fine for now).
I've tried everything to override the query, using methods like getEloquentQuery, getTableQuery, or even query directly on the $table variable, but with no success. Is there an easy way to achieve this, or am I forced to use something like Sushi?
Thanks to everyone for your help! Cheers!
I have a table connected to a Laravel model, but the data I want to display in the Filament table is completely customized compared to the classic ->get()->all() that I believe Filament uses by default. To clarify, in my GridJobImportResource resource, I'd like the default query to be this:
--- Query in the comment below ---
(It's still static in some parts, but it works, so for testing purposes, it's fine for now).
I've tried everything to override the query, using methods like getEloquentQuery, getTableQuery, or even query directly on the $table variable, but with no success. Is there an easy way to achieve this, or am I forced to use something like Sushi?
Thanks to everyone for your help! Cheers!