3 Replies
Well, the error is caused by selecting grades.*
This is your GradesResource, so the Filament query is already selecting all the grades.* fields. So you could fix it by just removing that from your select().
But really, you should use a relationship. Create a school() BelongsTo on your Grade model ...
... and then do ...
That's kind of the point of the Eloquent builder over DB. You don't need to mess around joining stuff by hand. Just use relationships.
removing that from your select().
did not work, it raised the following error:
Anyways, will try whereHas
instead of join
and update this thread.
Thank you @Hugh Messenger
whereHas
worked perfectly, thank you, againN/p