Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How Can I Insert new data with `HasOne` relationship

How Can I Insert new data with HasOne relationship



7.6k
Accepted
answer

create a new instance of your related model, then assign it to your model using the alias you defined in your hasOne relation



2.4k

create a new instance of your related model, then assign it to your model using the alias you defined in your hasOne relation

Thank you.