FilamentF
Filament3y ago
Emaz

query override

ChatGPT just told me to override Filament's query method (see photo)

This is because I would have to traverse models. Payment belongs to a client, which belongs to a contract, which belongs to a client, which belongs to a user. I was going to make an accessor like $this->contract->client->user->name but then I'd have an n+1 problem, right?

So is this query override standard practice? How should this be handled in V3?
Screenshot_2023-10-07_at_8.25.10_PM.png
Solution
So. TextColumn::make(‘blah.name) will display the name attribute on the blah relationship.
Was this page helpful?