Laravel Idea for PhpStorm - Full-featured IDE for productive artisans!

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.

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
Lucky Media logo

Lucky Media

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

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
LaraJobs logo

LaraJobs

The official Laravel job board

LaraJobs
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
Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate logo

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate

Build your SaaS application in hours. Out-of-the-box multi-tenancy and seamless Stripe integration. Supports subscriptions and one-time purchases, allowing you to focus on building and creating without repetitive setup tasks.

Supercharge Your SaaS Development with FilamentFlow: The Ultimate Laravel Filament Boilerplate
Rector logo

Rector

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

Rector
MongoDB logo

MongoDB

Enhance your PHP applications with the powerful integration of MongoDB and Laravel, empowering developers to build applications with ease and efficiency. Support transactional, search, analytics and mobile use cases while using the familiar Eloquent APIs. Discover how MongoDB's flexible, modern database can transform your Laravel applications.

MongoDB

The latest

View all →
Asymmetric Property Visibility in PHP 8.4 image

Asymmetric Property Visibility in PHP 8.4

Read article
Access Laravel Pulse Data as a JSON API image

Access Laravel Pulse Data as a JSON API

Read article
Laravel Forge adds Statamic Integration image

Laravel Forge adds Statamic Integration

Read article
Transform Data into Type-safe DTOs with this PHP Package image

Transform Data into Type-safe DTOs with this PHP Package

Read article
PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell image

PHPxWorld - The resurgence of PHP meet-ups with Chris Morrell

Read article
Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3 image

Herd Executable Support and Pest 3 Mutation Testing in PhpStorm 2024.3

Read article