Nested relationships.

Hi guys! I have a a big issue with nested relationship while i try to create a new model. I have a Person, BaseData and Address model. The relationships: a Person has a BaseData and the BaseData has an Address. I tried to solve like this in my Person class: public function baseData() : belongsTo { return $this->belongTo(BaseData::class)->with('address'); } But this kind of approach only work if i edit the Person and not in creation process. Do you have any idea? I tried to google this issue, but i couldn't find any answer.
2 Replies
Anyádpasija
Anyádpasija2mo ago
Thanks for your answer! I was thinking about it, but is it possible this way to declare all the data in the create page of the main model with only one click, it's important in my case.
Want results from more Discord servers?
Add your server