Read about load() and with() in the eloquent section from the Laravel documentation, you could have a pivot for 2, 3, 10 relationship, but that don't change the fact that each relationship is their own.
The main problem here is that I need to return all the riskareas from riskareas table and then retrieve all the permissions of each riskarea set in invite_riskarea pivot. I was not able to achieve this, does you have any idea?
First write the query, then convert it to eloquent
Обсуждают сегодня