As Laravel 5.4 is scheduled to be released this month, let's take a look at its new features and changes.

laravel 5.4 new features

Two new Middleware

We'll have 2 new middleware: TrimStrings and ConvertEmptyStringsToNull.

  • Trim Strings middleware: automatically trim all the request data.

  • ConvertEmptyStringsToNull: automatically convert all strings to null.

Laravel Elixir will be renamed to Laravel Mix

The next version of Laravel Elixir will be built on Webpack, and it will have a new name: Laravel Mix!

Meet the new Laravel Dusk

Dusk is a new browser testing tool of Laravel. Now we can use Dusk to test everything, including Javascript applications (Ajax loading, jQuery, etc.). This is the most awaited feature of Laravel 5.4!

Use any class as Facade

We can use any class as a Facade in Laravel 5.4

Better Vue.js 2 support

Laravel 5.4 will support Vue 2 from the ground. if you love Vue, you're gonna love Vue 2 more!

Use Markdown in our emails

Loving Markdown? With Laravel 5.4, we can use Markdown in our emails. Awesome!

JSON based language files

We can be able to use JSON as our language files. This is great and very useful for multi-language projects.

Add components and slots to our Blade templates

We can add components and slots to our template in Laravel 5.4. Basically, this feature allows us to build reusable HTML elements for our app. If you're working with ReactJS, Angular 2 or Vue; you're right at home.

Minor route improvements

Route system will be enhanced. Route caching system is improved.

Now we can define a named route at the beginning:

Route::name('blog')->get('blog/{id}/', function ($id) {
});

Final thoughts

Excited? Let's check back for more information. I'll share some more features when they're available.

This post is submitted by Jason Dake