The key that identifies the JS script file. If null, it will use $url as the key. If two JS files are registered with the same key at the same position, the latter will overwrite the former. Note that position option takes precedence, thus files registered with the same key, but different position option will not override each other.
'allowedIPs' => ['*'],
(тогда для всех станет доступным он)Пробовал, вроде все норм, но вот вопрос, как сделать рендер из модели? И вообще правильно ли это?
стал о ней задумываться только после того как контроллер стал похож на документацию к yii, ну объемом в смысле
// найти покупателей и получить их вместе с их странами и активными заказами
// SELECT * FROM `customer`
// SELECT * FROM `country` WHERE `id` IN (...)
// SELECT * FROM `order` WHERE `customer_id` IN (...) AND `status` = 1
$customers = Customer::find()->with([
'country',
'orders' => function ($query) {
$query->andWhere(['status' => Order::STATUS_ACTIVE]);
},
])->all();