I use the command
curl -s https://laravel.build/example-app | bash
And then I get Laravel 11.
How to install Laravel 10.x using Sail?
I tried command
composer create-project --prefer-dist laravel/laravel example-app "10.*"
but this project don’t use Sail.
2
Answers
You can install manually using "composer create-project" and then install Sail later (as described here in the documentation)
Install laravel/sail package
composer require laravel/sail --dev
Publish files
php artisan sail:install
Start Sail
./vendor/bin/sail up
If you render/download the script used to install Laravel with Sail (like in a browser):
you will get something like this:
the line where we have
is the actual command to install Laravel.
In this case you can replace it by the composer command to create a Laravel project:
of course you can also replace/add/remove the services you want in the "–with" parameter.
Finally you only need save the new script content to a file and execute locally.