Home > Back-end >  How to downgrade laravel version from 8.x to 7.x?
How to downgrade laravel version from 8.x to 7.x?

Time:11-10

I just started learning laravel from one of the online lessons, but in the tutorial I use laravel 7 while when I install laravel via laragon it automatically installs laravel 8. how can i downgrade from laravel 8 to laravel 7 on my laragon?

*Laravel 8 version was already installed on my laptop

CodePudding user response:

By default, Laragon will be download and install the newest version Laravel... To downgrade, I think the only way is reinstalling Laravel 7 by run command 'composer create-project...' in laragon.

CodePudding user response:

I didn't use laragon but I searched and I realized that Laragon has a file named sites.conf Which is located in {LARAGON_ROOT}\usr\sites.conf . You can open and change this configuration to your liking such as creating laravel project. Change this line

Laravel=composer create-project laravel/laravel %s --prefer-dist

to

Laravel=composer create-project --prefer-dist laravel/laravel:^7.0 projectName

I hope this way is useful.

  • Related