How to get the record id of the table record when using a query with inner joins.
I'm planning to put an action button to my table but my table has query that is using inner joins. When I tried putting an edit/view action, it gets the base table of the resource. How to edit the custom records returned by the getEloquentQuery with inner join.
6 Replies
Do you have relationships defined in your models?
yes I do have relationship. But I think its only limited to 2 tables? I'm listing records by inner joining the other tables @Brian Kidd
You shouldn't select ambigious columns. In that case don't select the ids of the joined tables
So I should just select the needed column right? Then the table will use the id of the parent model?
Yes. Currently SQL doesn't know which id to select
Thank you @Dennis Koch!