Composer

Composer is an application that is use to manage Php dependencies. It can be used with number of Php frameworks. It enable developer to declare libraries in project. Composer automatically download these libraries in a vendor folder. Vendor folder is sub-directory of project directory.

Laravel also uses composer for dependency management.

Composer installation

Composer can be download and install using this link. After downloading setup file. Run this setup and follow step by step installation.

During installation process select directory where Php is installed.

Install Libraries

To install the required libraries use the following composer command.This command read composer.json from root directory of folder and install dependencies.

php composer install

Update Libraries

For updation of pre installed libraries the following command is used.

php composer update

Update Particular Library

We can also specify list of libraries to update.

composer update vendor/first_package

OR

composer update vendor/first_package vendor/second_package

Composer Commands

To explore all commands of composer just go to command prompt and type composer or composer list and press enter. All available commands will be displayed.

 

Comments
Login to TRACK of Comments.