Laravel Php

What's New in laravel 5.6

What’s New in Laravel 5.6

As we all know laravel is fasted growing php MVC framework. Laravel teais working very fast on the functionality and updates of the laravel framework.   Taylor Otwell is ready to release the next version of Laravel 5.6.
According to laravel news.
Laravel 5.6 is scheduled to be released in February 2018.
We all want to know what’s new in laravel 5.6. there are two new changes is released in laravel 5.6

  1. New Blade Directives
  2. the Artisan Optimize Command

Let me Explain these updates.

New Blade Directives Coming to Laravel 5.6

Laravel 5.6 will include two new form blade directives for cross-site request forgery (CSRF) and HTTP method input, thanks to Taylor Otwell.
In Laravel 5.5 you do the following at the top of forms to create hidden inputs for the CSRF token and the spoofed HTTP method:

  {{ csrf_field() }}
  {{ method_field('PUT') }}
  <!-- ... -->

Starting in Laravel 5.6 you can do the following instead:

  <!-- ... -->

Laravel makes it easy to protect your site against CSRF attacks without any work on your part. However, if you want to submit a form successfully you must include a CSRF token input to verify that the form submission came from the application and not from another site.
Secondly, since HTML forms can’t make,PUTPATCH, or requestsDELETE you need to add a hidden input_method to spoof these HTTP verbs. Laravel uses the input_method to route the request to the appropriate controller action correctly.

I feel like the new directives are more instinctive and more natural to remember, however, the helper functions are still available for use if you prefer.

Laravel 5.6 Will Remove the Artisan Optimize Command

The Artisan command optimize is deprecated as of 5.5, and a commit in master has already removed it from 5.6. Waiting until 5.6 gives you time to update your build scripts and filescomposer.json ahead of the release.
As of Laravel 5.5, the composer.json no longer references optimize in the post-install-cmd and post-update-cmd scripts. The Optimize command is still defined, but does nothing in 5.5.
The 5.5 upgrade guide explains the reason for the deprecation:

With recent improvements to PHP op-code caching, the optimize Artisan command is no longer needed. You should remove any references to this command from your deployment scripts as it will be removed in a future release of Laravel.

You can see the removal in master and more discussion around the removal, where Taylor Otwell had this to say about the timing:

We’ll remove it in 5.6 and note in the upgrade guide for 5.5. It can break deployment scripts that are calling it if we remove it without warning.

Laravel 5.5 also requires PHP 7, so you should be safe to remove any reference to this command now if you’ve upgraded. Be sure to remove the command from your composer.json post-install-cmd and post-update-cmd scripts ahead of the 5.6 release.
Laravel 5.6 is available in the laravel officail site . we can download from the laravel website.
Thanks for reading this post. if you like this post. don’t forget to like my facebook page and youtube chaneel for more updates
Data Source : Laravel News.
Thanks for visitng.Keep Learning Keep sharing

Related posts

Laravel 6 release update, Laravel Vapor, and more


What's New in laravel 5.7


Detect device type in php



Dev rahul January 20, 2018 at 4:57 am

Usefull info

sunil kumar January 20, 2018 at 7:29 am

Really nice info

Noah38 January 27, 2018 at 2:38 am

We imagine that alone a expert writer can genius visionary fulfilled that’s nothing abbreviated of fulfilled

Didier February 10, 2018 at 12:15 am

Thanks a lot ! Glad to see a new Laravel version 🙂

Abram96 March 6, 2018 at 1:36 am

nice info


Leave a Comment