Laravel was the top PHP framework in 2016 and this trend will remain strong in 2017 because of the latest release of Laravel 5.4. Like the previous versions (particularly Laravel 5.3) of Laravel, this latest version comes with new and improved features including support of markdown, Laravel Dusk and improvements in Redis clustering.
The excitement of the community could be judged from the official tweet:
? Laravel 5.4 has been released! Here are the release notes: https://t.co/mfhwVKdc2z … Enjoy and build something amazing! ?
— Laravel (@laravelphp) January 24, 2017
Important Features in Laravel 5.4
Laravel 5.4 introduces important changes and updates to almost all areas of the framework. In particular, this update changed:
- Laravel Dusk
- Laravel Dusk
- Markdown Mail & Notification
- “Realtime” Facades
- Redis Cluster Support
- Collections Supports Higher Order Messages
Markdown Mail & Notification
Laravel 5.4 comes with pre-built markdown templates and components for mail and notifications. Laravel 5.4 powered apps could now generate responsive HTML emails. Learn more about markdown in Laravel mail and notification documentations.
Introduced for the first time in Laravel 5.4, Laravel Mix is the successor of Elixir API. In contrast to Gulp based Elixir, Mix is based on Webpack.
In Laravel 5.4, you can easily convert your application class into a facade. Previously, you could only use built-in facades in your application. Learn more about this feature here.
Redis Cluster Support
In previous versions of Laravel, clustering of the single host in the same application was not possible. In Laravel 5.4, you can now define Redis connections to multiple single hosts and multiple clusters within the same application.
Collections Support Higher Order Messages
Collections now support higher order messages (shortcuts for performing common actions on collections). Methods that support higher order messages are:
In addition to the above, Laravel 5.4 has introduced a host of features that will greatly ease the process of application development using the framework.
Related: Getting Started With Laravel 5.4
Laravel 5.4 Changelog
Several important entries on Laravel 5.4 changelog along with appropriate pull requests are:
- Added real-time facades (feb52bf)
retry()helper (e3bd359, 52e9381)
array_wrap()helper function (0f76617)
- Added default 503 error page into framework (855a8aa, #16848)
- Removed compiled class file generation and deprecated
- Secured password reset tokens against timing attacks and compromised databases (#16850, 9d674b0)
- Refactored authentication component (7b48bfc, 5c4541b)
- Added names to password reset routes (#16988)
- Stopped touching the user timestamp when updating the remember_token (#17135)
- Added Blade components and slots (e8d2a45, a00a201)
- Refactored Blade component (7cdb6a6, 5e394bb)
- Refactored View component (#17018, bb998dc)
mix()helper method (6ea4997)
- Escape inline sections content (#17453)
RedisStore::add()to store an item in the cache if the key doesn’t exist (#15877)
cache:forgetcommand (#16201, 7644977)
- Refactored cache events (b7454f0, #17120)
Cache::flush()now returns boolean (#15831, 057492d)
- Added –model to
make:controllercommand to generate resource controller with type-hinted model (#16787)
- Require confirmation for
key:generatecommand in production (#16804)
- Added Queueable to queued listener stub (dcd64b6)
- Changed namespace generation in
- Added Command::$hidden and
- Moved all framework command registrations into
ArtisanServiceProvider(954a333, baa6054, 87bd2a9)
- Support passing output buffer to
The complete changelog can be found here.
Laravel 5.4 has introduced several exciting features, along with significant improvements in existing features. In this article, I briefly touched upon several important new features and mentioned important entries in the changelog. If I have missed out any important detail or you would like to contribute to the discussion, do leave a comment below.
Launch PHP websites without the worry of Server Management.
Pre-Installed Optimized Stack with Git, Composer & SSH
Ahmed was a PHP community expert at Cloudways - A Managed PHP Hosting Cloud Platform. He is a software engineer with extensive knowledge in PHP and SEO. He loves watching Game of Thrones is his free time. Follow Ahmed on Twitter to stay updated with his works. You can email him at email@example.com