48 lines
1.2 KiB
PHP
Raw Normal View History

2013-05-24 10:14:49 -04:00
<?php
$params = require(__DIR__ . '/params.php');
$db = require(__DIR__ . '/db.php');
2013-10-18 07:30:41 +02:00
$config = [
2014-03-16 10:46:16 +06:00
'id' => 'basic',
'basePath' => dirname(__DIR__),
2014-04-10 15:05:01 -04:00
'bootstrap' => ['log'],
2014-03-16 10:46:16 +06:00
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'user' => [
'identityClass' => 'app\models\User',
'enableAutoLogin' => true,
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'mail' => [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => true,
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
2013-10-18 07:30:41 +02:00
];
2013-08-10 07:56:40 -04:00
2013-12-18 00:40:52 -05:00
if (YII_ENV_DEV) {
2014-03-16 10:46:16 +06:00
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
2014-03-16 10:46:16 +06:00
$config['modules']['debug'] = 'yii\debug\Module';
$config['modules']['gii'] = 'yii\gii\Module';
2013-08-10 07:56:40 -04:00
}
return $config;