Latest in branch 5.4
5.4.30
Released 04 Jul 2017
(8 years ago)
SoftwareLaravel
Version5.4
Status
End of life
Supported
PHP versions
PHP ≥ 5.6.4
Initial release5.4.0
24 Jan 2017
(9 years ago)
Latest release5.4.30
04 Jul 2017
(8 years ago)
End of bug fixes24 Jul 2017
(Ended 8 years ago)
End of security fixes24 Jan 2018
(Ended 8 years ago)
Release noteshttps://github.com/laravel/laravel/releases/tag/v5.4.30
Source codehttps://github.com/laravel/laravel/tree/v5.4.30
Documentationhttps://laravel.com/docs
Downloadhttps://laravel.com/docs/master/installation
Laravel 5.4 ReleasesView full list

What Is New in Laravel 5.4

Category Key Changes
New Features Laravel Dusk, Laravel Mix, Blade "unless" role, Higher Order Messaging, JSON based language files
Improvements Faster routing, Cleaner middleware syntax, Real-time facades, Collection method improvements
Developer Experience Automatic facades, Customizable Stubs, Markdown Mailables

What are the major new tools in Laravel 5.4?

Laravel 5.4 introduces two significant tools for the frontend and testing workflow. Laravel Dusk provides a powerful, easy-to-use browser automation and testing API. This matters because it simplifies testing JavaScript-heavy applications without dealing with the complexity of Selenium.

Laravel Mix replaces Elixir as the official build tool, offering a fluent API for defining Webpack build steps. In practice, it's a more streamlined and approachable layer on top of Webpack for compiling assets.

How does routing performance improve in this version?

Laravel 5.4 includes a major optimization for route registration, making large applications significantly faster. The framework now uses a new method for registering routes that reduces the overhead when you have hundreds of routes defined.

This is a backend improvement you'll feel immediately in apps with complex routing structures. It's one of those under-the-hood changes that makes the entire application feel more responsive.

What new Blade directives were added?

The new @unlessrole and @elserole directives provide a cleaner syntax for role-based conditional checks in your views. This complements the existing authorization features without needing to write custom logic directly in templates.

For JSON responses, the @json directive was added. It's a shortcut for json_encode with the proper options set, making it safer and more convenient to pass data to JavaScript components.

How are facades different now?

Real-time facades allow you to treat any class in your application as a facade without any prior configuration. Just prefix the class namespace with Facades\ and Laravel will handle the rest.

This is great for testing and decoupling code. You can now easily mock dependencies by using these impromptu facades, which wasn't as straightforward in previous versions.

What changed with collections and higher order messaging?

Higher Order Messages let you call methods on collections in a more concise way. Instead of using a closure with map or filter, you can now pass the method name directly for common operations.

For example, $users->filter->active()->map->email() becomes valid syntax. This makes collection pipelines much more readable when performing simple method calls on each item.

FAQ

Is Laravel Mix a direct replacement for Laravel Elixir?
Yes, Laravel Mix is the successor to Elixir and uses Webpack under the hood instead of Gulp. It provides a simpler, more expressive API for defining asset compilation steps while offering better performance and modern JavaScript support.

Do I need to learn a new testing syntax for Laravel Dusk?
Dusk uses a syntax very similar to Laravel's built-in testing utilities, so the learning curve is minimal. If you're familiar with methods like ->see() and ->click(), you'll feel right at home with Dusk's browser automation commands.

How do the JSON based language files work?
Instead of using PHP arrays for translation files, you can now use JSON files placed in the resources/lang directory. The framework will automatically detect and use these files, making it easier to manage translations for frontend JavaScript applications.

What's the benefit of the new middleware syntax?
The new ->middleware() method on routes provides a cleaner, more object-oriented way to assign middleware compared to the array syntax. It's mostly syntactic sugar, but it makes route definitions more readable and consistent.

Can I use Markdown for email templates?
Yes, Laravel 5.4 introduces Markdown mailables. You can now write email content using Markdown syntax and Laravel will automatically convert it to beautiful HTML emails with responsive components, making email template creation much faster.

Releases In Branch 5.4

VersionRelease date
5.4.3004 Jul 2017
(8 years ago)
5.4.2311 May 2017
(9 years ago)
5.4.2128 Apr 2017
(9 years ago)
5.4.1920 Apr 2017
(9 years ago)
5.4.1617 Mar 2017
(9 years ago)
5.4.1503 Mar 2017
(9 years ago)
5.4.903 Feb 2017
(9 years ago)
5.4.325 Jan 2017
(9 years ago)
5.4.024 Jan 2017
(9 years ago)