Laravel 6 Is Now Released

Published on by

Laravel 6 Is Now Released image

The Laravel team is proud to announce the release of Laravel 6 and it’s now available to everyone. This release marks the start of the Laravel framework (laravel/framework) using Semantic Versioning. Also, this release includes compatibility with Laravel Vapor, improved authorization responses, job middleware, lazy collections, sub-query improvements, among many other improvements.

Here are some of the new features included in Laravel 6:

Laravel 6.0 Is the New LTS

The release of Laravel 6.0 marks the new LTS version of Laravel, with bugfixes until September 3rd, 2021 and security fixes until September 3rd, 2022. Laravel 5.5 was the previous LTS (with security fixes until August 30th, 2020). Here’s the updated table with versions and dates of the latest versions of Laravel:

VersionReleaseBug Fixes UntilSecurity Fixes Until
V1June 2011
V2September 2011
v3February 2012
v4May 2013
[5.0](http://wp.laravel-news.com/laravel-5-released/)Feb 4th, 2015Aug 4th, 2015Feb 4th, 2016
[5.1 (LTS)](https://laravel-news.com/laravel-5-1-released)Jun 9th, 2015Jun 9th, 2017Jun 9th, 2018
[5.2](https://laravel-news.com/laravel-5-2-is-released)Dec 21st, 2015Jun 21st, 2016Dec 21st, 2016
[5.3](https://laravel-news.com/laravel-5-3-is-now-released)Aug 23rd, 2016Feb 23rd, 2017Aug 23rd, 2017
[5.4](https://laravel-news.com/laravel-5-4)Jan 24th, 2017Jul 24th, 2017Jan 24th, 2018
[5.5 (LTS)](https://laravel-news.com/laravel-5-5)Aug 30th, 2017Aug 30th, 2019Aug 30th, 2020
[5.6](https://laravel-news.com/laravel-5-6)Feb 7th, 2018Aug 7th, 2018Feb 7th, 2019
[5.7](https://laravel-news.com/laravel-5-7-is-now-released)Sep 4, 2018Feb 4th, 2019Sep 4th, 2019
[5.8](https://laravel-news.com/laravel-5-8)Feb 26th, 2019Aug 26th, 2019Feb 26th, 2020
6.0 (LTS)Sept 3rd, 2019Sept 3rd, 2021Sept 3rd, 2022

Semantic Versioning

The Laravel release notes clarify semantic versioning going forward in Laravel 6.0 and beyond:

The Laravel framework (laravel/framework) package now follows the semantic versioning standard. This makes the framework consistent with the other first-party Laravel packages which already followed this versioning standard. The Laravel release cycle will remain unchanged.

Ignition Error Page

Laravel 6.0 now ships with Ignition—a new open-source exception page for Laravel—created by Freek Van der Herten and Marcel Pociot. To learn more about this feature, check out our announcement post, and see it in action in Laracasts’ What’s New in Laravel 6: Ignition is Laravel’s Amazing New Error Page video.

Improved Authorization Responses

Previously it was difficult to provide custom error messages around authorization to end users. Laravel 6 introduces a Gate::inspect method which provides the authorization policy’s response:

$response = Gate::inspect('view', $flight);
 
if ($response->allowed()) {
// User is authorized to view the flight...
}
 
if ($response->denied()) {
echo $response->message();
}

Job Middleware

Job Middleware is a feature contributed by Taylor Otwell, which allows jobs to run through middleware:

// Add a middleware method to a job class
public function middleware()
{
return [new SomeMiddleware];
}
 
// Specify middleware when dispatching a job
SomeJob::dispatch()->through([new SomeMiddleware]);

The middleware will help you avoid custom logic in the body of your job’s handle() method. Learn more in our post: Job Middleware is Coming to Laravel 6.

Lazy Collections

Lazy collections are a game-changer for working with extensive collections of data, including Eloquent model collections. A new Illuminate\Support\LazyCollection class leverages PHP’s generators to keep memory low while working with large datasets. Check out Lazy Collections documentation for more details on this impressive new feature!

Eloquent Subquery Enhancements

Learn more about Jonathan Reinink’s contributions to subqueries in his post on Laravel News – Eloquent Subquery Enhancements in Laravel 6.0. Also, check out Jonathan’s excellent talk on using subqueries (among other techniques) in his Laracon talk Eloquent Performance Patterns.

Laravel UI

The frontend scaffolding provided with Laravel 5.x releases is now extracted into a separate laravel/ui Composer package. This allows first-party UI scaffolding to be iterated on separately from the primary framework.

If you want the Traditional Bootstrap/Vue/ scaffolding, you will run the following command:

composer require laravel/ui
php artisan ui vue --auth

Learn More

You should now be able to start a new Laravel 6 application with the laravel CLI tool:

laravel new my-app

Here’s a few resources related to Laravel 6 that you should check out:

Paul Redmond photo

Staff writer at Laravel News. Full stack web developer and author.

Filed in:
Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project.

Visit No Compromises
Laravel Forge logo

Laravel Forge

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Forge
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
No Compromises logo

No Compromises

Joel and Aaron, the two seasoned devs from the No Compromises podcast, are now available to hire for your Laravel project. ⬧ Flat rate of $7500/mo. ⬧ No lengthy sales process. ⬧ No contracts. ⬧ 100% money back guarantee.

No Compromises
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $2500/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
LoadForge logo

LoadForge

Easy, affordable load testing and stress tests for websites, APIs and databases.

LoadForge
Paragraph logo

Paragraph

Manage your Laravel app as if it was a CMS – edit any text on any page or in any email without touching Blade or language files.

Paragraph
Lucky Media logo

Lucky Media

Bespoke software solutions built for your business. We ♥ Laravel

Lucky Media
Lunar: Laravel E-Commerce logo

Lunar: Laravel E-Commerce

E-Commerce for Laravel. An open-source package that brings the power of modern headless e-commerce functionality to Laravel.

Lunar: Laravel E-Commerce
DocuWriter.ai logo

DocuWriter.ai

Save hours of manually writing Code Documentation, Comments & DocBlocks, Test suites and Refactoring.

DocuWriter.ai
Rector logo

Rector

Your partner for seamless Laravel upgrades, cutting costs, and accelerating innovation for successful companies

Rector

The latest

View all →
Non-backed Enums in Database Queries and a withSchedule() bootstrap method in Laravel 11.1 image

Non-backed Enums in Database Queries and a withSchedule() bootstrap method in Laravel 11.1

Read article
Laravel Pint --bail Flag image

Laravel Pint --bail Flag

Read article
Laravel Herd for Windows is now released! image

Laravel Herd for Windows is now released!

Read article
The Laravel Worldwide Meetup is Today image

The Laravel Worldwide Meetup is Today

Read article
Cache Routes with Cloudflare in Laravel image

Cache Routes with Cloudflare in Laravel

Read article
Learn how to manage timezones in your Laravel Apps image

Learn how to manage timezones in your Laravel Apps

Read article