Docker Laravel 11 issue: How to switch Laravel versions

83 Views Asked by At

I am currently learning Laravel by watching this course. I attempted to install Laravel 10 using the following command:

curl -s "https://laravel.build/example-app" | bash

However, this command installs Laravel 11 instead. I specifically need Laravel 10 because the dependency laravel-nestedset does not support Laravel 11. How can I install Laravel 10?

1

There are 1 best solutions below

2
Abdulrahman On

By using command which is in the doc:

curl -s "https://laravel.build/example-app" | bash

This will download the latest laravel version(11). To install laravel 10, use composer, then, if you are using sail, download the package, and run:

php artisan sail:install

As doc said. I reviewed the package to make something like category and subcategory as I understood. If so, this can easily be done using laravel, no need for external package. You can read articles about that to understand the point.