Answer the question
In order to leave comments, you need to log in
How to derive a relationship from a polymorphic pivot table?
Hello.
There is such structure of tables.
events is connected through personable (polymorphic relationship) with persons, and that, in turn, has roles through person_role. These roles I get like this
$event->persons()->with('roles')->paginate($paginate)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question