Laravel the best use on Earth. PHP Framework , what we share with you today is Laravel 5.3 of the relevant characteristics, come together to see it.
< Span style= "FONT-FAMILY:CALIBRI;" "According to laravel official news, Laravel 5.3 laracon us 7 or 29 laracon schedule on the website, taylor will be in louisville local time 7 month 28 5:15 speech, all should be at that time. Below, take everyone to see &NBSP, Laravel 5.3 new features coming soon.
1. Roll back a migration
Migration Newly added feature is to allow you to roll back one instead of all:
PHP Artisan Migrate : Rollback--step=1
2. Foreach loop for Blade templates
In the @foreach loop of the Blade template , you can use $loop variables. It allows you to use this:
@if ($loop->first)
Do something on the first iteration.
@endif
@if ($loop->last)
Do something on the last iteration.
@endif
3. Eloquent collections will serialize
4. Change console queue output to real class name
5. You can customize the simple paging
6. First or Create
Now Firstorcreate () allows additional values to be passed in:
return user::firstorcreate ([' github_id ', $githubUser->id], [' Avatar ' = ' $githubUser->avatar]);
7. The query constructor allows the collection to be returned
The query constructor is returned before the array, and now returns the collection:
$collection = db::table (' posts ')->get ();
8. multiple migration paths
Now you can load the migration in the custom path in service provider:
$this->loadmigrationsfrom (' Path/to/migrations/folder ')
9. Laravel Echo
Laravel Echo is a new feature that is a big boost relative to the current broadcast system.
Original from: Laravel News