I want to install Laravel 9 with sail, but when I execute: curl -s "https://laravel.build/example-app" | sh , the command installs Laravel 11.
Is there a command that allows me to specify which version I want to install?
A command equivalent to this:
composer create-project laravel/laravel:^9.0 example-app
I tried this: curl -s "https://laravel.build/devjobs" | sh , but this command installs Laravel 11, I want to install Laravel 9.
2
Answers
Never use older versions of Laravel.
Laravel9 is already EOL.
https://laravel.com/docs/11.x/releases
Always use the latest version when creating a new project.
1)
composer create-project
(depends on havingphp
andcomposer
installed)You can use the
--ignore-platform-reqs
option to preventcomposer
from nagging you about dependencies you might be missing (since you’re going to develop on sail, your host machine shouldn’t need anything aside from docker)Create project
Require sail
Install sail
If you don’t have composer installed, first get Composer
2)
git clone
anddocker run
Clone the
laravel/laravel
repoRemove repo files
Install composer dependencies through docker
Install dependencies (including sail) through docker
Publish sail’s docker-compose file