How to Upgrade Your Laravel Project to Latest Version?

Enver Şanlı
2 min readApr 27, 2022

Hello everyone !

We are going to talk about version upgrading for Laravel. You know, Laravel released new version previously and probably our project is still Laravel 8 or lower. I will show you basically “how to upgrade” Laravel version.

Update Your Composer File

You need to find your composer.json in your project. You will see it in main folder in your project.

composer.json

Double click and open it.

Firstly, you must find laravel/framework line in your composer.json file. When you find it, you will see your current Laravel version for your project.

Previous :

"laravel/framework": "^8.65",

In my project, Laravel version is 8.65. I will change this line like below.

Updated :

"laravel/framework": "^9.0",

Secondly, find “nunomaduro/collision” line in your composer.json and update it as below version.

Previous :

"nunomaduro/collision": "^5.10",

Updated :

"nunomaduro/collision": "^6.1",

Finally, you need to find facade/ignition line and replace it with “spatie/laravel-ignition”: ^1.0”

Previous :

"facade/ignition": "^2.5",

Updated :

"spatie/laravel-ignition": "^1.0",

Yes, you did it ! Just run below command in your terminal to upgrade your Laravel version immediately !

composer update

Your Laravel version is upgraded.

(Note : Depending your project, you may need to change another lines in your project. This case shows only basically upgrading.)

Enjoy your coding !

Enver Şanlı

BackEnd Developer, Social Thinker & Farmer

--

--