4,000 emails/month for free | Mailtrap sends real emails now!

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
Jump24 - UK Laravel Agency

Laravel Developers that Click into Place. Never outsourced. Never offshored. Always exceptional.

Visit Jump24 - UK Laravel Agency
Bacancy logo

Bacancy

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

Bacancy
Tinkerwell logo

Tinkerwell

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

Tinkerwell
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review
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
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit

The latest

View all →
FrankenPHP v1.11.2 Released With 30% Faster CGO, 40% Faster GC, and Security Patches image

FrankenPHP v1.11.2 Released With 30% Faster CGO, 40% Faster GC, and Security Patches

Read article
Capture Web Page Screenshots in Laravel with Spatie's Laravel Screenshot image

Capture Web Page Screenshots in Laravel with Spatie's Laravel Screenshot

Read article
Nimbus: An In-Browser API Testing Playground for Laravel image

Nimbus: An In-Browser API Testing Playground for Laravel

Read article
Laravel 12.51.0 Adds afterSending Callbacks, Validator whenFails, and MySQL Timeout image

Laravel 12.51.0 Adds afterSending Callbacks, Validator whenFails, and MySQL Timeout

Read article
Handling Large Datasets with Pagination and Cursors in Laravel MongoDB image

Handling Large Datasets with Pagination and Cursors in Laravel MongoDB

Read article
Driver-Based Architecture in Spatie's Laravel PDF v2 image

Driver-Based Architecture in Spatie's Laravel PDF v2

Read article