D
D
DonVictoro2019-09-28 13:56:15
Yii
DonVictoro, 2019-09-28 13:56:15

How to make conditions in dependencies in Yii Asset?

Good day. There are 2 different assets - AdminAsset and SiteAsset. It was necessary to make sure that they are connected first than YiiAsset, so I did the following in the configuration file.

'yii\web\YiiAsset' => [
                    'depends' => [
                        'app\assets\AdminAsset',
                        'app\assets\SiteAsset',
                    ],
                ],

It is necessary that the admin module connects AdminAsset without touching SiteAsset, and vice versa.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question