
Laravel 5.3 is currently in development and with all new Laravel releases, new features are being teased out as they are added. Here is a quick look at some of these new features:
Eloquent Collections are cleanly serialized and re-pulled by queued jobs:
In 5.3, Eloquent collections are cleanly serialized and re-pulled by queued jobs, just like individual models are! pic.twitter.com/IZ5t118WNT
— Laravel (@laravelphp) May 31, 2016
Jacob Bennett tells us why this matters.
Queue console output changed to show the actual class names:
Cleaning Laravel queue console output so it shows actual class names instead of "CallQueuedHandler" for every job.
pic.twitter.com/iYKAhTHaeU
— Taylor Otwell (@taylorotwell) June 1, 2016
Ability to customize simple pagination
Today in Laravel 5.3 development. Bringing back simple pagination customization via views.
pic.twitter.com/Ir28svVGCA
— Taylor Otwell (@taylorotwell) June 1, 2016
First Or Create
Now firstOrCreate allows additional values to be passed to it. Example:
return User::firstOrCreate(['github_id', $githubUser->id], ['avatar' => $githubUser->avatar]);
Query Builder will now return a Collection
Query builder previously always returned arrays and now it’s going to change to return a collection. This will keep results the same no matter how you pulling the data out:
$collection = DB::table('posts')->get();
Multiple Migration Paths
Now you can load your own migration paths from a service provider:
$this->loadMigrationsFrom('path/to/migrations/folder')
For more on, Alex Bowers has an overview.
Laravel Echo
Laravel Echo is a new feature designed to be an improvement over the current event broadcasting system. See the Laracasts video for more information.
The list only covers some of the big changes, but Laravel 5.3 is shaping up to be a nice release. A specific release date hasn’t been announced, but it should be out either this month or next. Be sure and join the Laravel newsletter to get notified as soon as 5.3 is officially released.