v5.8.10 is Now Released Featuring a New Replicating Model Event

v5.8.10 is Now Released Featuring a New Replicating Model Event

The Laravel team just released v5.8.10, and this release includes two new features. A replicating model event and NotificationFake is now macroable.

If you are not familiar with Model Events, read our tutorial on getting started with Laravel Model Events and see how these can be beneficial in your codebase.

The replicating event is added for when you want to make a copy of a model. For example:

$post = Post::find(1);
$newPost = $post->replicate();
$newPost->save();

This grabs the first post, calls replicate and assigns it to a $newPost variable, then finally saves it as a new record in the database. The replicating event will fire as part of this flow. Check out the pull request for more details and to see how this was implemented.

v5.8.10 Changelog

Added

  • Added replicating model event (#28077)
  • Make NotificationFake macroable (#28091)

Fixed

  • Exclude non-existing directories from event discovery (#28098)

Changed

  • Sorting of events in event:list command (3437751)
  • Removed path hint in compiled view (33ce7bb)

Filed in: News / Releases
Laravel News Partners

Laravel Jobs

PHP Developer - Full time w/ benefits, US Only
Northern Virginia or Remote (US Only)
Guidance Residential
Full Stack Developer
Remote
Wehaa.com
Laravel API Developer
Las Vegas, NV (Must work on-site)
V Shred
Laravel Developer (Vue, SQL Server)
Remote
World Trade Organization
Web Application Developer (Vue.js & Laravel)
Remote
Apero Creative Development

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.