Laravel5.3 is coming with following new features,
- 1. Rollback one migration
- 2. Blade Foreach Loops (new $loop variable)
- 3. Eloquent Collections are cleanly serialized and re-pulled by queued jobs
- 4. Queue console output changed to show the actual class names
- 5. Ability to customize simple pagination
- 6. Customizing additional parameters in FirstOrCreate
- 7. Query Builder will now return a Collection
- 8. Multiple Migration Paths
- 9. Laravel Echo
- 10. Implicit controller routes have been removed
- 11. New validate() method in Validator
- 12. Collection::where() accepts operators
- 13. PDO Integer Parameters are now bound as PARAM_INT
- 14.New JSON-column where() and update() methods
- 15.The new cache() global helper
- 16.Customizing pagination templates
- 17.Image dimension validation rules
- 18.Advanced operations with Collection::where
Rollback one migration
A new feature added to migrations that allow you to rollback just one migration instead of the whole batch.
php artisan migrate:rollback --step=1
Still have rollback command to rollback the latest migration.
php artisan migrate:rollback
Blade Foreach Loops
A new feature added to Blade foreach that allow you to take some action only on the first/last element of the array.
Inside Blade foreach loops it now gives you access to a $loop variable.
@if($loop->first) Do something on the first iteration. @endif @if($loop->last) Do something on the last iteration. @endif
Query Builder will now return a Collection
Query builder used to return arrays previously and now it’s going to change to return a collection. This will keep results the same no matter how you pull out the data out.
$collection = DB::table('posts')->get();
First Or Create
Now you can pass additional data to firstOrCreate method.
return User::firstOrCreate(['id', $user->id], ['avatar' => $user->avatar]);
Multiple Migration Paths
Now you can load your own migration paths from a service provider
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.