main.php 915 Bytes
Newer Older
1
<?php
2
$params = array_merge(
3 4 5 6
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
7 8
);

9
return [
10 11
    'id' => 'app-frontend',
    'basePath' => dirname(__DIR__),
12
    'bootstrap' => ['log'],
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    'controllerNamespace' => 'frontend\controllers',
    'components' => [
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
        ],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
    ],
    'params' => $params,
33
];