Yii2 - using kartik Select2 as filter input of GridView
'filter' => Select2::widget([ 'name' => 'CampaignSearch[partner_id]', 'model' => $searchModel, 'value' => $searchModel->partner_id, 'data' => ArrayHelper::map( Partner::getAll(), 'id', 'name' ), 'size' => Select2::MEDIUM, 'options' => [ 'placeholder' => '-- Tất cả --', 'style' => 'width: 300px;' ], 'pluginOptions' => [ 'allowClear' => true ], 'addon' => [ 'prepend' => [ 'content' => '<i class="glyphicon glyphicon-folder-open"></i>' ] ], ]),
Yii2 session timeout settings
Edit @yourApp/config/main.php
'components' => [
'user' => [
'identityClass' => 'backend\models\User',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_cmsIdentity',
'httpOnly' => true,
'expire' => 1800,
],
'authTimeout'=> 1800, // seconds
],
....
],
Subscribe to:
Posts (Atom)