Search code examples
laravellaravel-8laravel-7laragon

How to downgrade laravel version from 8.x to 7.x?


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 laravel 8 to laravel 7 on my laragon?

*Laravel 8 version was already installed on my localhost.


Solution

  • 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.