Composer how to specify install directory

Whenever

composer create-project laravel/laravel .

Doesn't work properly for whatever reason, I just

 laravel new temp 

And then move the contents of the new application into the folder I do want ; )


You should specify your destination directory where you want to create the project, from the command prompt, type cd C:\xampp\htdocs then press enter. After that, type following code on the command prompt and press enter

composer create-project laravel/laravel my-laravel-project

Here my-laravel-project will be your project folder. The composer.json file is used to setup some configurations (for Dependency management) during installation of the package via packagist. Visit getcomposer.org for more information.


composer create-project laravel/laravel .

Installs in your current directory =)