Posted: 22-08-2019

Upgrading Laravel To 6.0 From 5.8

Upgrading Laravel To 6.0 From 5.8

Laravel Upgrading To 6.0 From 5.8 documentation is availiable on the new Laravel website.

The new Laravel 6.0 will be a LTS release and  continues the improvements made in Laravel 5.8 by introducing semantic versioning, compatibility with Laravel Vapor, improved authorization responses, job middleware, lazy collections, sub-query improvements, the extraction of frontend scaffolding to the laravel/ui Composer package, and a variety of other bug fixes and usability improvements.

For simple/medium application  the Estimated Upgrade Time is about One Hour.

Some new features in the incoming 6.0 version are:

  • Semantic Versioning
  • Laravel Vapor Compatibility
  • Improved Authorization Responses
  • Job Middleware
  • Lazy Collections
  • Eloquent Subquery Enhancements
  • Laravel UI


PHP 7.2  is Required

PHP 7.1 will no longer be actively maintained as of December 2019. Therefore, Laravel 6.0 requires PHP 7.2 or greater.



The Input Facade

The Input facade, which was primarily a duplicate of the Request facade, has been removed. If you are using the Input::get method, you should now call the Request::input method. All other calls to the Input facade may simply be updated to use the Request facade.


Updating Dependencies

Update your laravel/framework dependency to ^6.0 in your composer.json file.

Next, check 3rd party packages consumed by your application and verify you are using the proper version for Laravel 6 support.


Authorized Resources & viewAny

Authorization policies attached to controllers using the authorizeResource method should now define a viewAny method, which will be called when a user accesses the controller's index method. Otherwise, calls to the index method of the controller will be rejected as unauthorized.


String & Array Helpers

All str_ and array_ helpers have been moved to the new laravel/helpers Composer package and removed from the framework.

To replace these helpers to must use the Illuminate\Support\Str and Illuminate\Support\Arr classes



Carbon 1.x No Longer Supported in favour of Carbon 2.0


For more details please check the Laravel 6 Realease Note