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.
Was this page helpful?