Alias to pivot table
sbc640964 opened this issue · comments
If I use the belongsToMany relationship twice, I also need to give an alias to the pivot table, belongs?
Hi @sbc640964,
Yes, you need to add an alias to one of the pivot tables ("For pivot tables, ..."):
https://github.com/staudenmeir/eloquent-has-many-deep?tab=readme-ov-file#table-aliases