Saani
Saani

Reputation: 782

Class 'dosamigos\ckeditor\CKEditor' not found

I am working on a project in Yii2 where I need to integrate CKEditor. I used this to install it:

composer require 2amigos/yii2-ckeditor-widget

It downloads the library files under /vendor directory. When I copied the files from local to server and used this:

use dosamigos\ckeditor\CKEditor;

<?= $form->field($userSurveyConfig,
      'survey_email_body')->widget(CKEditor::className(),
      ['options' => ['rows' => 6],'preset' => 'basic'])
?>

When I run the page, this error pops up:

> Class 'dosamigos\ckeditor\CKEditor' not found

What i am doing wrong here? Any help?

Upvotes: 0

Views: 1804

Answers (1)

Yupik
Yupik

Reputation: 5032

Copy composer.json file to server and run composer update on server.

Upvotes: 1

Related Questions