Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading Laravel 5.4 to latest version (5.7)

I am working on Laravel 5.4 with PHP version 5.6.4. My goal is to upgrade my project to Laravel 5.7 with PHP 7.1.

Now my question is: Do I have to upgrade to 5.5 > 5.6 > 5.7 or can I go directly from 5.4 to 5.7?

like image 660
Michael Avatar asked Oct 17 '18 07:10

Michael


People also ask

How do I update laravel?

The recommended method of upgrading is to create a new Laravel 5.0 install and then to copy your 4.2 site's unique application files into the new application. This would include controllers, routes, Eloquent models, Artisan commands, assets, and other code specific to your application.

Can laravel 6 be upgraded to 8?

Show activity on this post. If you meant to upgrade your current Laravel 4.2 project to 8.0, you need to upgrade to 5(5.0 - 5.8) first, then 6, then 7, and then 8.

Can I upgrade to laravel 9?

You should update the following dependencies in your application's composer.json file: laravel/framework to ^9.0.


1 Answers

Just update your laravel/framework dependency to 5.7.* in your composer.json file. Since you are upgrading from 5.4 to 5.7, then you can easily just run

composer update

And if you modified some of Laravel's Traits or Methods in your 5.4 application, then you can check here for more info

like image 152
Tijo Titus Avatar answered Oct 21 '22 21:10

Tijo Titus