web.php 811 Bytes
Newer Older
Qiang Xue committed
1
<?php
2
$params = require(__DIR__ . '/params.php');
sensorario committed
3
$config = [
Qiang Xue committed
4
	'id' => 'bootstrap',
Qiang Xue committed
5
	'basePath' => dirname(__DIR__),
6
	'extensions' => require(__DIR__ . '/../vendor/yii-extensions.php'),
sensorario committed
7 8
	'components' => [
		'request' => [
9
			'enableCsrfValidation' => true,
sensorario committed
10 11
		],
		'cache' => [
Qiang Xue committed
12
			'class' => 'yii\caching\FileCache',
sensorario committed
13 14
		],
		'user' => [
Qiang Xue committed
15
			'identityClass' => 'app\models\User',
sensorario committed
16 17
		],
		'errorHandler' => [
Qiang Xue committed
18
			'errorAction' => 'site/error',
sensorario committed
19 20
		],
		'log' => [
21
			'traceLevel' => YII_DEBUG ? 3 : 0,
sensorario committed
22 23
			'targets' => [
				[
Qiang Xue committed
24
					'class' => 'yii\log\FileTarget',
sensorario committed
25 26 27 28 29
					'levels' => ['error', 'warning'],
				],
			],
		],
	],
30
	'params' => $params,
sensorario committed
31
];
32 33 34 35 36 37 38 39

if (YII_ENV_DEV) {
	$config['preload'][] = 'debug';
	$config['modules']['debug'] = 'yii\debug\Module';
	$config['modules']['gii'] = 'yii\gii\Module';
}

return $config;