Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ggat's avatar
Level 1

Create laravel project with specific version

Hi, just searching for quick answer, is there a way to pass a version/branch number to Laravel CLI when creating new project. Without editing composer.json manually and so on.

For example, we are on 5.1 now and can't dedicate time to read about changes in 5.2 and thus want to initialize 5.1 project. I'm searching for easy way, 'hard way' I already know, thanks.

0 likes
2 replies
ggat's avatar
Level 1

In case someone else want the same:

composer create-project laravel/laravel projectName --prefer-dist 5.1

Change the version as you want.

pedroroccon's avatar

I like to use

composer create-project laravel/laravel=5.0 my-project-name --prefer-dist

Please or to participate in this conversation.