Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- return [
- 'id' => 'app-backend',
- 'basePath' => dirname(__DIR__),
- 'controllerNamespace' => 'backend\controllers',
- 'bootstrap' => ['log'],
- 'modules' => [],
- 'components' => [
- 'user' => [
- 'identityClass' => 'common\models\User',
- 'enableAutoLogin' => true,
- ],
- 'log' => [
- 'traceLevel' => YII_DEBUG ? 3 : 0,
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'formatter' => [
- 'defaultTimeZone' => 'Europe/Malta',
- 'timeZone' => 'Europe/Malta',
- 'dateFormat' => 'php:d/m/Y',
- 'datetimeFormat'=>'php:d-M-Y H:i:s',
- 'currencyCode' => 'EUR',
- 'decimalSeparator' => ',',
- ],
- 'errorHandler' => [
- 'errorAction' => 'site/error',
- ],
- ],
- 'params' => $params,
- ];
- */----------------Config file ---------------/*
- */----------------view file ---------------/*
- <?= GridView::widget([
- 'dataProvider' => $dataProvider,
- 'filterModel' => $searchModel,
- 'columns' => [
- ['class' => 'yii\grid\SerialColumn'],
- 'id',
- 'title',
- 'post:ntext',
- 'created_at:datetime',
- 'updated_at:datetime',
- ['class' => 'yii\grid\ActionColumn'],
- ],
- ]); ?>
Advertisement
Add Comment
Please, Sign In to add comment