use common\models\Employee; /* @var $this yii\web\View */ /* @var $searchModel backend\models\EmployeeSearch */ /* @var $dataProvider yii\data\ActiveDataProvider */ $this->title = Yii::t('app', 'Employees'); $this->params['breadcrumbs'][] = $this->title; ?> <div class="employee-index"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php // echo $this->render('_search', ['model' => $searchModel]); ?> <p> <?php echo Html::a(Yii::t('app', 'Create Employee'), ['create'], ['class' => 'btn btn-success']); ?> </p> <?php echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['attribute' => 'sex', 'filter' => Employee::itemAlias('sex'), 'value' => function ($model) { return $model->sexName; }], 'fullName', 'countryName', ['class' => 'yii\\grid\\ActionColumn']]]); ?> </div>