Ragheb AlKilany
Ragheb AlKilany

Reputation: 933

Add Yii2 Extension via Composer

I tried to add an extension by running the composer and it didn't work. I asked about it and they told me that it will work if I install it via command line. And I really don't know how to use the command line.

On the tutorial, they told me to run

$ php composer.phar require kartik-v/yii2-widget-colorinput "*"

But I think that I must run something before that, to access the composer. What should I do exactly?

Upvotes: 3

Views: 359

Answers (1)

Onedev_Link
Onedev_Link

Reputation: 2012

Step 1: Download & install composer. For windows you can download Composer-Setup.exe.

Step 2: Move to directory when located composer.json file.

Step 3: Enter php composer.phar require kartik-v/yii2-widget-colorinput "*" command, or modify composer.json file and enter php composer.phar update command.

{
    "require": {
        "kartik-v/yii2-widget-colorinput": "*"
    }
}

Upvotes: 1

Related Questions