Home > Article > Development Tools > How does composer create a project in the current directory?
The following tutorial column of composer will introduce how composer creates a project in the current directory. I hope it will be helpful to friends in need!
Specific question:
How does composer create a project in the current directory instead of creating a folder under the current folder? Called the project root directory
composer create-project laravel/laravel mylaravel 5.1.* --prefer-dist
Assume that the current directory is laravel51. After using this command, a mylaravel folder will be created under the laravel51 directory, which contains the project. How to create a project in the current directory
Do not create that subfolder
Solution:
"create-project" command. Pass a package name and it will create the project's directory for you. This command is designed like this, so you might as well cancel the directory creation once.
If you want to create the directory yourself, you can use composer.json to introduce the corresponding dependencies and execute composer install
composer document (https://docs.phpcomposer.com/03-cli.html#create -project)
The above is the detailed content of How does composer create a project in the current directory?. For more information, please follow other related articles on the PHP Chinese website!