require

Estimated reading time: 1 minute

require

composer require vendor/package
composer require vendor/package:1.2.0
composer require "code4mk/multitrust:dev-master"
composer require "code4mk/multitrust": "1.0.x-dev"

require-dev

composer require-dev vendor/package

globally

composer global require vendor/package
composer global update vendor/package
composer global update
composer global remove vendor/package
composer global update laravel/installer

install/i

  • install command install all package from package.json . if has lock file that time install all package‚Äôs specifig verison from package-lock.json
composer install

remove

composer remove vendor/package

outdated

composer outdated

update/u

composer update vendor/package
composer update "vendor/*"

auto-load

  • autoloading from package.json
composer dump-autoload

init

composer init