I have the following models Show, Presenter, Image.
Shows can have multiple presenters. Presenters have one image.
I can do this to get a presenter with their image:
$presenter = Presenter::with('image)->find(1);
And I can do this to get a show with presenters:
$show = Show::with('presenters')->find(1);
Is there a way I can return a show with presenters and their image in one statement?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/20gazOC
via IFTTT
Aucun commentaire:
Enregistrer un commentaire