Install laravel in an existing directory

Laravel can be installed with the Laravel installer or composer. Both installers will place the application into a folder which is named after the application. Sometimes we want to affect that behaviour.

Install Laravel in a custom directory

Let’s install Laravel into the folder PROJECT_NAME.

Laravel installer

[php]laravel new PROJECT_NAME[/php]

Composer

[bash]composer create-project laravel/laravel PROJECT_NAME[/bash]

Install Laravel in the current directory

This wil install Laravel into the current folder.

Laravel installer

[php]laravel new[/php]

Composer

The following solution is suggested to work, but it doesn’t!

[bash]composer create-project laravel/laravel .[/bash]