<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-backend',
	'name' => 'Fitness Adminisztráció',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
    'modules' => [],
    'components' => [
    		'request' => [
    				'enableCsrfValidation'=>false,
//     				'csrfParam' => '_backendCSRF',
//     				'csrfCookie' => [
//     						'path' => '/backend/web',
//     				],
    		],
        'user' => [
            'identityClass' => 'common\models\User',
            'enableAutoLogin' => true,
        	'identityCookie' => [
        			'name' => '_backendUser', // unique for backend
//         			'path' => '/backend/web',
       		]
        ],
    	'session' => [
    			'name' => '_backendSessionId', // unique for backend
   				'savePath' => __DIR__ . '/../runtime', // a temporary folder on backend
   		],
        'log' => [
            'traceLevel' => YII_DEBUG ? 3 : 0,
            'targets' => [
                [
                    'class' => 'yii\log\FileTarget',
                    'levels' => ['error', 'warning'],
                ],
            ],
        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
    ],
    'params' => $params,
];
