O'Reilly logo
  • GIL EG thinks this is interesting:

$author = Author::where('first_name', '=', 'Jules')->where('last_name', '=', 'Verne')->first();

  $book = new Book;

  $book->title = 'Michael Strogoff';
  // other data...

  $book->author_id = $au

From

Cover of Learning Laravel's Eloquent

Note

create new related model record just on the fly