There is a main model (Pattern) having many models (Layer ). There is a model (Slayer) that has a polymorphic relationship to the models (Image and Text). The model (Text) has no child relationships, whereas (Image) has a one-to-one relationship to the model (File)
In what way, when unloading the model (Pattern), pull up all (Layer's) each with its own additional relations?
Pattern::whereId($id)->with('layers.layereable')->get();

from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37zDCpk
via IFTTT
Aucun commentaire:
Enregistrer un commentaire