• Yii Framework

    How to install Yii Framework

    1). Installation: can be done by two methods: The preferred way to install this extension is through composer. Either run composer require 2amigos/yii2-ckeditor-widget or add "2amigos/yii2-ckeditor-widget" : "~2.1" to the require section of your application's composer.json file. 2). Usage: The library comes with two widgets: CKEditor and CKEditorInline. One is for classic edition and the other for inline editing respectively. Using a model with a basic preset: NOTE:(you have to use this code to frontend/views/ and your respective folder where you want to use ckeditor) use dosamigos\ckeditor\CKEditor; <?= $form->field($model, 'text')->widget(CKEditor::className(), [ 'options' => ['rows' => 6], 'preset' => 'basic' ]) ?> Using inline edition with basic preset: use dosamigos\ckeditor\CKEditorInline; <?php…

  • Yii Framework

    How to add image to dashboard using Yii

    Images (stored in a folder of my web-project) via a GridView in Yii2. The images are associated to an URL which is stored in a database … MySQL -> Platform table: ID | Name | Img (Image’s URL) [ ‘attribute’ => ‘col_6’, ‘format’ => ‘html’, ‘label’ => ‘ImageColumnLable’, ‘value’ => function ($data) { return Html::img(‘/ss/frontend/images/’ . $data[‘col_6’], [‘width’ => ’60px’]); }, ],