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

laravel new PROJECT_NAME

Composer

composer create-project laravel/laravel PROJECT_NAME

Install Laravel in the current directory

This wil install Laravel into the current folder.

Laravel installer

laravel new

Composer

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

composer create-project laravel/laravel .

Leave a Reply

Your email address will not be published. Required fields are marked *