How to Upgrade Your Laravel Project to Latest Version?

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.

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store