Reputation: 8413
When laravel 5 is not yet released, I install Laravel 4 using this command composer create-project laravel/laravel your-project-name --prefer-dist
. But now when I use it, It installs laravel 5. I just want to use laravel 4, not yet ready for 5.
Upvotes: 3
Views: 7129
Reputation: 8413
I've tried the other answers but doesn't work for me. So here's the command I use.
composer create-project laravel/laravel=4.1.27 your-project-name --prefer-dist
Source : Installing specific laravel version with composer create-project
UPDATE
Laravel updated the installation docs of 4.* after releasing 5.
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
Source: http://laravel.com/docs/4.2#install-laravel
Upvotes: 8
Reputation: 1974
U can use this
composer create-project laravel/laravel {directory} 4.2 --prefer-dist
replacing {directory} with the actual directory of your project
Upvotes: -3
Reputation: 332
I use Alternate Method.
Docs says Alternate Method
Once Composer is installed, download the 4.2 version https://github.com/laravel/laravel/archive/v4.2.11.zip of the Laravel framework and extract its contents into a directory on your server. Next, in the root of your Laravel application, run the php composer.phar install (or composer install) command to install all of the framework's dependencies. This process requires Git to be installed on the server to successfully complete the installation.
If you want to update the Laravel framework, you may issue the php composer.phar update command.
Upvotes: 0
Reputation: 153120
If nothing specified composer create-project
will get the latest stable version. You can change that by just specifying the version you want:
composer create-project laravel/laravel project-name ~4.2.0 --prefer-dist
This will install the latest 4.2.*
version of laravel
Upvotes: 2
Reputation: 1959
You should download latest laravel 4.2 release from github - https://github.com/laravel/laravel/releases/tag/v4.2.11
then use composer update
to download all relevant packages including latest laravel version
Upvotes: 1