[英]How to install extension/widget via composer in yii2
I newbie in yii2. 我是yii2的新手。 i try to install extention Ckeditor. 我尝试安装扩展Ckeditor。 Scenario : 场景:
=== install via composer ================= ===通过作曲家安装=================
c:\xampp\php>composer require 2amigos/yii2-ckeditor-widget
successfully to install, but i can't still used. 成功安装,但我仍然无法使用。 and in my 在我的
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. 我dosamigos\\ckeditor\\CKEditor
类dosamigos\\ckeditor\\CKEditor
错误。
So, i think, i was wrong to install extensions via composer. 因此,我认为通过Composer安装扩展程序是错误的。 Please give me advice. 请给我建议。
Have you check your composer.json
file to include something like?: 您是否检查过composer.json
文件以包含类似内容?:
"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? 无论如何,您在选项中使用反引号而不是单引号,并且在'preset' => 'basic
遗漏了一个...是错字吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.