yii2

How do I set global settings for the Yii2 widget?

There is, for example, such a repeating code. <?php echo $form->field($model, 'requirements_ru')->widget( CKEd ... 'editorOptions' => [ 'preset' => 'basic', 'inline' => false, 'height' => 600 ], ]);

Installing Yii2-advanced

Follow the instructions from the site http://web-sprints.ru/ustanovka-yii2-na-openserver/ I tried to install, the first comma ... I need to install composer.json file in the project folder, then to make composer update, and then all the required commands?

Complex page on yii2

In general, such a problem I have a page on which a new "store" is created in the modalka, also in another modalka, any of th ... ps', 'modelShop', 'tariffs')); } UPD: So I found an error saying that I can't accept the id attribute because it is unsafe.

Organization of a multilingual application (php, yii2 framework)

Faced with the problem of organizing a multilingual application in php, mysql, yii2. In the course of "Googling", analyzing ... of MYSQL longtext, as well as crutches with fetching, searching, and writing data. I'm sorry to push you to the right idea)

kartik datepicker

Yii2 Bootstrap 4 use kartik\field\FieldRange; use kartik\form\ActiveForm; use kartik\datecontrol\DateControl; ... ct a date, for some reason, the table with the choice simply does not appear (only the edges, as seen in the 2nd screenshot)

Yii2, a complex table. Merge cells, sum values, and export a table

There is data that needs to be output to a table on the page, and then add a button to export this table to excel. It is assu ... ]; Output to the page: <?= GridView::widget([ 'dataProvider' => $provider, 'columns' => $columns, ]); ?>

Yii2 update form

There is a form with data, there is one BUT, some fields in it are unique, if they are not changed, an error is displayed, su ... index','id'=>$post->id]); }else{ return $this->render('update',compact('post')); } }

Add a field to the DB table (Yii2)

How can I safely add a field to a table in a DB on a site that is on Yii2? Just add a field by query to the DB and add this f ... ortant to do it safely and without jambs, since there are a lot of entries in the table and the site is spinning on the prod.

Search the site for multiple keywords Yii2

I can't find articles on how to make a painless search on the site by two keywords for example words in the search I did this ... ry for Apple iPhone 4 Copy" and I want to get the search result for the words iPad battery . How do I do this? MySQL DATABASE

How do I run a test on Yii2?

I'm dealing with the new Yii2, I pulled up this repository: https://github.com/yiisoft/yii2 Next, I pulled up the files usin ... ther my the powers are all there. That is, please tell me how to write your first test, what is happening there in general ?

yii2 in conjunction with httpclient and using proxy, exceptions

The yii2 framework is used. The task is to check the list of proxies from the file for validity, by simply trying to open a p ... onse->isOk) { fwrite($fp, $proxy."\r\n"); fwrite($log_fp, $proxy."\r\n"); $count++; } }

How do I connect an external js file to Yii2?

I try to connect the js file available via Content Delivery Network in Yii2, but I get the error "Uncaught SyntaxError: Unexp ... script" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/amplitude.js"></script>', $this::POS_READY); ?>

Downgrading the Yii framework when installing the package

I'm trying to install the "smalot/pdfparser" extension for parsing pdf files. When installing the extension, the Yii framewor ... //asset-packagist.org" } ], "replace": { "npm-asset/bootstrap": ">=4.2.1" } } I would be grateful for any help.

How to learn yii2?

Friends. Half a year ago, I decided to go to the web, started learning html/css and php. I learned basic things, even made a ... So, in the study of PCP, the book "PHP 7 in the original" helped me out. Maybe there is a similar feed for dummies with yii?

Debugging the Yii2 queue task

I decided to use yii2-queue for sending emails. <?php namespace app\models; use yii\base\BaseObject; use app\models\News ... or something. queue is configured to work with db . everything works well, I see the tasks, I see that they are completed...

How can I go to a new page and download a yii2 file at the same time?

My code snippet, but if the first if is not executed, the transition to the desired page does not occur, but only the downloa ... =' . 'enelope.pdf'); exit($pdf->Output('', 'S')); // работает не коорректно, не переводит на нужную страницу

Default sorting for the list of entries in the Yii2 admin panel

There is a standard CRUD generated by Gii There is a standard IndexAction public function actionIndex() { $searchMode ... 'dataProvider' => $dataProvider, ]); } Is this a normal approach, or are there special settings for this purpose?

Yii2, how to clear the cache (disk cache)

I upload style updates and JS to production, clear the frontend/web/assets and frontend/runtime/cache folders, clear the cach ... changes are accepted if opened incognito) Files are cached in disk cache How do I clear the cache so that the changes start.

ALTER TABLE Yii2 migrate

Tell me, pliz, how to rename the table on Yii (in migration) . Is there a built-in method, or should I use an sql command lik ... eateCommand('ALTER TABLE newsletter RENAME TO mail')->execute(); But I would like to know if there is a built-in method?

Yii2 Module Routing

I write an api module in yii2, and use it for versioning submodules. And the problem is that I can't access the page in the s ... rest\UrlRule', 'controller' => ['api/v1/user']], '/' => 'site/index', ], ], I need your help.