Answer the question
In order to leave comments, you need to log in
How to fix Argument 2 passed to yii\base\View::{closure}() must be an instance of users, instance of app\models\Users given?
in C:\OpenServer\domains\medicalcentr\modules\admin\views\users\index.php
'id',
'name',
'patronymic',
'surname',
'login',
//'password',
//' position',
[
'class' => ActionColumn::className(),
'urlCreator' => function ($action, users $model, $key, $index, $column) {
return Url::toRoute([$action, 'id' => $model->id]);
}
],
],
]); ?>
I can't figure out where the error is. I am newbie,
<?php
NavBar::begin([
'brandLabel' => Yii::$app->name,
'brandUrl' => Yii::$app->homeUrl,
'options' => [
'class' => 'navbar navbar-expand-md navbar-dark bg-dark fixed-top',
],
]);
echo Nav::widget([
'options' => ['class' => 'navbar-nav'],
'items' => [
['label' => 'Home', 'url' => ['/site /index']],
['label' => 'Applications', 'url' => ['/admin/application/index']],
['label' => 'Users', '
url' => ['/admin/users/index']], Yii::$app->user->isGuest ? (
['label' => 'Login', 'url' => ['/site/login']]
) : (
''
. Html::beginForm(['/site/logout'], 'post', ['class' => 'form-inline'])
. Html::submitButton(
'Logout (' . Yii: :$app->user->identity->username .')',
['class' => 'btn btn-link logout']
)
.Html::endForm()
.''
)
],
]);
NavBar::end();
?>
everything went wrong, I hope for your help!!!
Answer the question
In order to leave comments, you need to log in
I could not find any information on various ruforums, I hope for your help!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question