Вопрос, как можно это исправить без добавления public string $customField в модель Product?
которое я достаю в select
В итоге, получается что показывается чистая таблица у которого customField пустое, но записи точно есть.
foreach ($orderStatuses as $orderStatus) {
$name = $orderStatus->group ? $orderStatus->group->name : 'TamaraGoniGusei';
$statusList[$name][$orderStatus->id] = $orderStatus->name ;
} /**
* @return IdentityInterface
*/
public static function findByUsername($usernam): IdentityInterfacepublic static function findByUsername($username)
{
$ebobo = static::find()
->where(['username' => $username])
->orWhere(['email' => $username])
->one();
if($ebobo instanceof IdentityInterface){
return $ebobo;
}
throw new \yii\web\NotFoundHttpException('The user not exist.');
}public function getListSpecialty(): array
{
if($this->specialty instanceof yii\db\ActiveQueryInterface){
return ArrayHelper::map($this->specialty::find()->all(), 'id', 'title');
}
return [];
}$sotrudniki=Sotrudnik::find()->asArray()->all();getPodrazd() надо как-то так строить: $sotrudniki = Sotrudnik::find()->joinWith('podrazd', true, 'INNER JOIN')->all();[
['cities', 'each', 'rule' => ['required']],
['cities', 'each', 'rule' => ['integer']],
]иначе yii ругается что не может найти такое поле cities[]
->renderAjax()$query = Album::find()->joinWith('photo')->orderBy('id')->all();new Pdf?$contentно выходит ошибка что не удалось
$this->layout = 'pdf'; если потом рендерить страницу минуя фреймворк? Я так понимаю вместо return $pdf->render(); должно быть или return $this->renderPartial($pdf->render());return $this->renderContent($pdf->render());допустим в корень
Где правильнее хранить search-модели Yii2?
дабы при росте их количества не получалась каша из моделей