Composer is a dependency management tool for PHP 5.3 and above. Simply put, in Composer you can find all kinds of excellent third-party extensions. It can enrich your project and save development time.
First you need to install Composer on your local Windows machine.
Once the installation succeeds, use a command window to install it — open the directory and run: echo @php “%~dp0composer.phar” %*>composer.bat
Close the command window and reopen it, then run: composer. The result is shown in the figure.
This means the installation succeeded. Next, switch the mirror address to a domestic one.
Run: composer config -g repo.packagist composer https://packagist.phpcomposer.com
Then run composer install for a global installation.
By the way, run this again: composer update to update.
Then go into your project directory and run: composer init to start creating your project’s composer.json.

