Where and how can I run composer commands?

血红的双手。 提交于 2020-01-17 05:48:46

问题


I'm kinda lost with Composer and the documentation isnt really helping me. I bascially want to install Laravel but I dont know where I need to run the commands and how.

I've installed composer via the exe on a windows PC that runs XAMPP.

For Example this command:

composer global require "laravel/installer=~1.1"

How can I run this command? In the windows console? And does it matter where?


回答1:


Go to htdocs folder and right click on mouse then you will see one option called

use composer here click on that then cmd will open

then you can use composer commands like

composer create-project laravel/laravel

this will create laravel setup.

To perform other commands like compose install

composer update

php artisan commands

you need to right click on project and use composer here then only you can perform composer install,composer update, php artisan and all .




回答2:


You should actually go with a good console on windows. Try gitbash. (https://msysgit.github.io/) It has one of the best consoles.

If you still want to use composer from cmd, just type composer and it will work (provided you have set correct path).



来源:https://stackoverflow.com/questions/31849139/where-and-how-can-i-run-composer-commands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!