how to install dependencies or use composer at all in windows
Edit: actually there is a Windows installer on the Composer download page that will install Composer globally, so you won't need any composer.phar
anymore. Install it from here, and then just run "composer install" from the directory where you have your composer.json
.
(original answer below)
I didn't test this myself, but I think it's how it should work :
Download the composer.phar
and put it in the same directory as your composer.json
.
cd
into the directory where you have your composer.json
:
cd some\directory
Finally, run the composer :
php composer.phar install
For very Beginner Windows Users
Download the installer for windows from here
Check the installation by executing
composer
command at command promptNow, create the
composer.json
file at the same level where you haveVendor
directory (not insideVendor
).Move to the directory where you have
composer.json
with the command prompt and run the following command:composer install
It will show messages like 'packages are downloaded' and 'autoload.php file created'. (Check your
/app/Vendor/
directory)Now insert this code at the beginning of
/app/config/core.php
:require_once dirname(__DIR__) . '/Vendor/autoload.php';
The code above will load all the classes automatically.
Hope this helps for beginners.