Laravel

Update laravel version 9 to 10

Hello, there I hope you are doing well, in this blog we will learn about how to update laravel  from 9 to 10,

If you wanted to updated your project from laravel version 8 to 10, then please first update your laravel version to 9, click here to update your project from laravel version 8 to 9.

Follow the below steps to update your project from laravel 9 to 10.

1. update your PHP version to a minimum of 8.1

2.Composer version update

3. Update composer dependency

4.Make changes to the composer.json file

5.Check the version

1.update your PHP version to a minimum of 8.1

First of all, you have to update your system’s PHP version to 8.1 as laravel 10 doesn’t support PHP version 8.0, to update PHP version 8.1 in Xampp please follow this link, however if you wants to update PHP version in Ubuntu you can check here.

2. Update your composer to version 2

You have to update the composer to the latest version, in order to use the laravel 10, to update the composer to the latest version run the below command.

composer self-update

3. Update composer dependency

Now we have to update the project composer dependency to latest version, to do this run the below command, from the root of your project folder.

composer update

4. Make changes to the composer.json file

change “laravel/framework”: “^9.19”, to “laravel/framework”: “^10.10”, and “minimum-stability”: “dev”, to “minimum-stability”: “stable”, after the change your code will look like the below image.

Now again run the below command

composer update

5. check the laravel version

To check the laravel version run the below command.

php artisan --version

Shaiv Roy

Hy Myself shaiv roy, I am a passionate blogger and love to share ideas among people, I am having good experience with laravel, vue js, react, flutter and doing website and app development work from last 7 years.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button