如何在yii2中通过composer安装扩展/小部件

I newbie in yii2. i try to install extention Ckeditor. Scenario :

  1. I used xampp.
  2. my folder name in htdocs is 'bic'

=== install via composer =================

c:\xampp\php>composer require 2amigos/yii2-ckeditor-widget

successfully to install, but i can't still used. and in my

bic\yiisoft\vendor i can't find 2amigos folder.

i write in my view

use dosamigos\ckeditor\CKEditor;
<?= $form->field($model, 'text')->widget(CKEditor::className(), [
`options` => [`rows` => 6],
`preset` => `basic`
]) ?>

I've got error Class dosamigos\ckeditor\CKEditor not found.

So, i think, i was wrong to install extensions via composer. Please give me advice.

Have you check your composer.json file to include something like?:

"require": {
    ...
  "2amigos/yii2-ckeditor-widget" : "2.0",
    ...
}

Anyway you are using backticks instead of single quotes in options and missing one in 'preset' => 'basic... Is it a typo?