index.php 1.4 KB
<?php
    
    use common\models\CustomerSearch;
    use yii\data\ActiveDataProvider;
    use yii\grid\GridView;
    use yii\web\View;
    use yiister\gentelella\widgets\Panel;
    
    /**
     * @var View               $this
     * @var ActiveDataProvider $dataProvider
     * @var CustomerSearch     $searchModel
     */
    
    $this->title = Yii::t('app', 'Customers');
    $this->params[ 'breadcrumbs' ][] = $this->title;
?>
<div class="customer-index">
    
    <?php $panel = Panel::begin(
        [
            'header' => $this->title,
        ]
    ) ?>
    
    <?= GridView::widget(
        [
            'dataProvider' => $dataProvider,
            'filterModel'  => $searchModel,
            'columns'      => [
                [ 'class' => 'yii\grid\SerialColumn' ],
                
                //'username',
                //'auth_key',
                //'password_hash',
                //'password_reset_token',
                'name',
                'email:email',
                // 'status',
                'created_at:date',
                // 'updated_at',
                
                'phone',
                // 'gender',
                // 'birthday',
                // 'city',
                // 'address',
                // 'social_id',
                
                [ 'class' => 'yii\grid\ActionColumn' ],
            ],
        ]
    ); ?>
    
    <?php $panel::end() ?>
  `
</div>