Inserting & Updating Related Models: Recursively Saving Models & Relationships

Recursively Saving Models & Relationships

$post = App\Post::find(1);

$post->comments[0]->message = 'Message';
$post->comments[0]->author->name = 'Author Name';

$post->push();

Related concepts

Inserting & Updating Related Models: Recursively Saving Models & Relationships — Structure map

Clickable & Draggable!

Inserting & Updating Related Models: Recursively Saving Models & Relationships — Related pages: