Lararavel5.3 is currently under development, and as with all new releases Laravel released, this version will add some new features and features, let's see the quick.
1, eloquent set as Queue task constructor parameter optimization
Laraval Queue tasks When distributing a eloquent model as a constructor parameter, we can use serializesmodels trait to serialize only the primary key of the model. When the queue task is actually processed, the full model instance is fetched from the database based on the primary key (refer to the queue document), and in Laravel 5.3, the eloquent collection can do the same.
2. The queue console output is modified to show the actual class name
3. Customize Simple Paging
4, Firstorcreate method to add additional parameters
The Firstorcreate method allows you to pass extra values as a second parameter:
return user::firstorcreate ([' github_id ', $githubUser->id], [' Avatar ' = ' $githubUser->avatar]);
5. Query Builder return type is set
The Query Builder returns an array in previous versions of Laravel, and returns a collection in Laravel 5.3, which guarantees consistency of the data output:
$collection = db::table (' posts ')->get ();
6. Multiple Migration paths
In Laravel 5.3 You can load your own migration (migration) path in service provider Provider:
$this->loadmigrationsfrom (' Path/to/migrations/folder ')
The benefit of this is that the extension package maintains its own database migration files without having to manually copy them to the Database/migrations directory each time.
7, Laravel Echo
Larval Echo is a new feature designed to enhance the Laravel existing Event Broadcast System (view existing event broadcast documents).
The above listed only some new features and new features, complete update will have to wait until the Laravel 5.3 version of the official release to know, should not wait too long, this month or next month will meet with you, pay attention to Laravel College, the college will be the first time to inform you and launch Laravel 5.3 Chinese documents.