I got 3 tables. Table 1 & 2 has their ids as foreign keys in third one(pivot).
Relations for first one is
, second is
and pivot has relationships with both of them i.e
I tried accessing it in controller of first one like this:
Result that i get is array of games where instead of individual army data , i get collection from pivot table.
I can loop through it and get it that way, is there more elegant way of doing it?