Taylor Otwell has recently announced Laravel Horizon and Laravel 5.5 is also released. The Laravel community is pretty excited about the new features of the new version. In this short article, I am going to cover several of these new features and will attempt to highlight their importance and benefit.
Let’s get started.
PHP 7 now a Pre-Req
The support for PHP 5.5 has already ended and the security support for 5.6 is going to end in 2018. As with Symfony 4, Laravel 5.5 will also requires PHP 7.0 at the minimum.
Laravel 5.5 will be going to be the next LTS release after Laravel 5.1. This release will include two years of bug fixes and three years of security patches.
Laravel 5.5 in July / August is scheduled to be our next LTS release. ✅
— Laravel (@laravelphp) February 20, 2017
“Vendor:publish” Get’s Provider Prompt
Now when you run the command “php artisan vendor:publish” you will get a prompt in your timeline to choose which provider you need to publish. Here is a GIF highlighting the process:
Render Mailable to Browsers
In Laravel 5.5, you can render mailable directly in your browser for testing by creating a route for it.
Support for Email Themes in Mailable
Laravel 5.4 offers markdown mailable but there was no option for customization. In Laravel 5.5 you can use your custom styles for emails.
Laravel Migrate Fresh Command
Laravel 5.5 comes with a new migrate command “migrate:fresh”. This command will first drop all the tables and then migrate them all.
In Laravel 5.5, a new command “presets” is added, through which you can replace the default frontend like VueJS with any other frontend framework (React, for instance). You could also use this command to remove the frontend JS framework if you don’t need one.
Request Data From Validation
Laravel 5.5 will now return the request data after validation. Now you can directly save the data after validation.
public function store(Request $request)
$data = $this->validate($request,[
'todo' => 'required',
'description' => 'required',
'category' => 'required'
// $data = request()->only('name', 'price', 'category_id');
Custom Validator Rules
With Laravel 5.5, you can create your custom validation. Taylor Otwell has written a great tutorial on the topic.
With Laravel 5.5, comes a new directive for Blade templating engine,
Blade::if(). If you want to learn more about it, Laracast has a video on the topic.
In addition to the above-mentioned features, Laravel 5.5 comes with a host of awesome features that could make the lives of Laravel developers a lot easier. Check out the official announcement for more details.
Create Laravel apps without the worry of server management.
Deploy your app on optimized PHP hosting servers for Laravel.