search
HomePHP FrameworkLaravelLaravel 6.0 LTS released with update details

Laravel 6.0 LTS released with update details

The Laravel team has announced the official release of Laravel 6.0 on September 4, 2019. The release of this version marks the laravel framework starting to use semantic version, in addition, this version also includes support for Laravel Vapor , optimized authorization response, task middleware, lazy collection, subquery optimization and many other detailed optimizations.

The following are some new features about Laravel 6.0 version:

Laravel 6.0 is the new LTS version

The release of Laravel 6.0 marks the new release of Laravel The LTS (Translator's Note Long-Term Support) version, the bug fixes of this version will last until September 3, 2021, and the security fixes will last until September 3, 2022. Previous LTS version Laravel 5.5 (security fixes until August 30, 2020). The following is the update table for the latest version of Laravel and the date of the latest version:

Laravel 6.0 LTS released with update details

Semantic version number

Laravel release notice clarifies Semantic control for Laravel 6.0 and later versions:

Laravel framework (Laravel /framework) package follows the Semantic Versioning standard. This keeps the framework consistent with other first-party Laravel packages that already follow this versioning standard. Laravel's release cycle will remain unchanged.

Optimize authorization response

Before this, it was very difficult to provide custom error messages to end users around authorization policies. Laravel6 provides the Gate::inspect method to authorize policy responses. :

$response = Gate::inspect('view', $flight);
if ($response->allowed()) {
    // 用户已授权...
}
if ($response->denied()) {
    // 用户未授权,返回响应信息
    echo $response->message();
}

Task middleware

Task middleware allows middleware to filter queue tasks:

// 在任务类中定义中间件方法
public function middleware()
{
     return [new SomeMiddleware];
}
// 分发任务时可通过through指定中间件
SomeJob::dispatch()->through([new SomeMiddleware]);

Using middleware can avoid Write code that has nothing to do with the main business logic in the handle() method of the task class.

Lazy Collections

Lazy collections are a game-changer for collections that deal with large amounts of data (including Eloquent model collections). A new lighting \Support\LazyCollection class leverages PHP's generators to keep memory low when working with large data sets. Check out the Lazy Collections documentation for more details on this impressive new feature!

Eloquent Subquery Enhancements

Learn more about Jonathan Reinink's contributions to subqueries, see his post on Laravel News Article – Great subquery enhancements in Laravel 6.0. Also, check out Jonathan's great talk on using subqueries (among other techniques) in his Laracon talk Eloquent Performance Patterns.

Laravel UI

The front-end scaffolding that comes with Laravel 5.x is now separated into an independent laravel/ui Composer package. This allows for easy iteration of UI scaffolding outside of the main framework.

If you want to build with traditional Bootstrap/Vue/, you will run the following command:

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

Learn more

You can use it now The laravel CLI tool starts a new Laravel 6 application:

laravel new my-app

For more Laravel related technical articles, please visit the Laravel Framework Getting Started Tutorial column to learn!

The above is the detailed content of Laravel 6.0 LTS released with update details. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:learnku. If there is any infringement, please contact admin@php.cn delete
Alternatives to Laravel for Full-Stack Development: Comparing FrameworksAlternatives to Laravel for Full-Stack Development: Comparing FrameworksApr 30, 2025 am 12:26 AM

If you are looking for alternatives to Laravel, Node.jswithExpress.js, Django, RubyonRails and ASP.NETCore are optional options. 1.Node.jswithExpress.js is suitable for projects that require high performance and scalability. 2.Django is suitable for projects that require rapid development and full functionality. 3.RubyonRails is suitable for rapid prototyping and flexible development. 4. ASP.NETCore is suitable for high traffic and cross-platform development, but the learning curve is steep.

Project Management Powerhouses: Keeping Distributed Teams Organized and On TrackProject Management Powerhouses: Keeping Distributed Teams Organized and On TrackApr 30, 2025 am 12:20 AM

Thekeychallengesinmanagingdistributedteamsarecommunicationgaps,timezonedifferences,andtaskmanagement.Projectmanagementtoolshelpovercomethesechallengesby:1)enhancingcommunicationthroughplatformslikeSlackandMicrosoftTeams,2)managingtimezonedifferencesw

Management from a Distance: Leading and Empowering Distributed Teams EffectivelyManagement from a Distance: Leading and Empowering Distributed Teams EffectivelyApr 30, 2025 am 12:12 AM

The key to leading a remote team is to use technology, build trust and develop personalized strategies. 1) Use communication tools and task management systems to ensure clear task allocation and status updates. 2) Avoid burnout through asynchronous communication and enhance productivity. 3) Incentive team members through authorization and setting clear goals. 4) Pay attention to team satisfaction and collaboration, and conduct comprehensive inspections regularly.

Tech Troubles: Ensuring Equitable Access to Tools and Resources for Distributed Team MembersTech Troubles: Ensuring Equitable Access to Tools and Resources for Distributed Team MembersApr 29, 2025 am 12:40 AM

Methods to ensure that distributed team members have fair access to tools and resources include: 1) using low-bandwidth alternatives, such as asynchronous video or text updates, to solve connection problems; 2) setting up core overlapping working hours and providing flexible working hours to manage time zone differences; 3) adapt to different cultural needs through translation functions and cultural awareness training. These strategies help create an inclusive and efficient remote working environment.

Instant Messaging Must-Haves: Fostering Real-Time Communication in Remote SettingsInstant Messaging Must-Haves: Fostering Real-Time Communication in Remote SettingsApr 29, 2025 am 12:38 AM

Forenhancingremotecollaboration,aninstantmessagingtoolmusthave:1)reliabilityforconsistentmessagedelivery,2)anintuitiveuserinterfaceforeasynavigation,3)real-timenotificationstostayupdated,4)seamlessfilesharingforefficientdocumentexchange,5)integration

Have you ever faced any challenges while working in distributed teams?Have you ever faced any challenges while working in distributed teams?Apr 29, 2025 am 12:35 AM

Thebiggestchallengeofmanagingdistributedteamsiscommunication.Toaddressthis,usetoolslikeSlack,Zoom,andGitHub;setclearexpectations;fostertrustandautonomy;implementasynchronousworkpatterns;andintegratetaskmanagementwithcommunicationplatformsforefficient

What are the security improvements in the new Laravel version?What are the security improvements in the new Laravel version?Apr 29, 2025 am 12:17 AM

Laravel's latest version has significantly improved security, including: 1. Enhanced CSRF protection, through a more robust token verification mechanism; 2. Improved SQL injection protection, through an enhanced query construction method; 3. Better session encryption to ensure user data security; 4. Improved authentication system, supporting finer granular user authentication and multi-factor authentication (MFA).

Time Zone Tango: Navigating Scheduling Conflicts in a Global WorkforceTime Zone Tango: Navigating Scheduling Conflicts in a Global WorkforceApr 29, 2025 am 12:13 AM

Tonavigateschedulingconflictsinaglobalworkforce,usetechnology,empathy,andstrategicplanning:1)EmploytoolslikeWorldTimeBuddyorCalendlyforscheduling;2)Rotatemeetingtimestoensurefairness;3)Establishcorehoursforoverlap;4)Beculturallysensitiveandflexiblewi

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools