Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.53 KB | None | 0 0
  1. <?php
  2.  
  3. $params = require __DIR__ . '/params.php';
  4. $db = file_exists(__DIR__.'/dblocal.php')?
  5.     (require __DIR__ . '/dblocal.php'):
  6.     (require __DIR__ . '/db.php');
  7.  
  8. $config = [
  9.     'id' => 'basic',
  10.     'basePath' => dirname(__DIR__),
  11.     'bootstrap' => ['log'],
  12.     'language'=>'ru-RU',
  13.     'aliases' => [
  14.         '@bower' => '@vendor/bower-asset',
  15.         '@npm'   => '@vendor/npm-asset',
  16.     ],
  17.     'modules' => [
  18.         'auth' => [
  19.             'class' => 'app\modules\auth\Module',
  20.         ],
  21.     ],
  22.     'components' => [
  23.         'activity'=>['class'=>\app\components\ActivityComponent::class, 'classModel'=>\app\models\Activity::class],
  24.         'request' => [
  25.             // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  26.             'cookieValidationKey' => 'yCt7UZbX7KPxg5ulYCZpaUKXLUVBGqyC',
  27.         ],
  28.         'cache' => [
  29.             'class' => 'yii\caching\FileCache',
  30.         ],
  31.         'user' => [
  32.             'identityClass' => 'app\models\User',
  33.             'enableAutoLogin' => true,
  34.         ],
  35.         'errorHandler' => [
  36.             'errorAction' => 'site/error',
  37.         ],
  38.         'mailer' => [
  39.             'class' => 'yii\swiftmailer\Mailer',
  40.             // send all mails to a file by default. You have to set
  41.             // 'useFileTransport' to false and configure a transport
  42.             // for the mailer to send real emails.
  43.             'useFileTransport' => true,
  44.         ],
  45.         'log' => [
  46.             'traceLevel' => YII_DEBUG ? 3 : 0,
  47.             'targets' => [
  48.                 [
  49.                     'class' => 'yii\log\FileTarget',
  50.                     'levels' => ['error', 'warning'],
  51.                 ],
  52.             ],
  53.         ],
  54.         'db' => $db,
  55.  
  56.         'urlManager' => [
  57.             'enablePrettyUrl' => true,
  58.             'showScriptName' => false,
  59.             'rules' => [
  60.             ],
  61.         ],
  62.  
  63.     ],
  64.     'params' => $params,
  65. ];
  66.  
  67. if (YII_ENV_DEV) {
  68.     // configuration adjustments for 'dev' environment
  69.     $config['bootstrap'][] = 'debug';
  70.     $config['modules']['debug'] = [
  71.         'class' => 'yii\debug\Module',
  72.         // uncomment the following to add your IP if you are not connecting from localhost.
  73.         'allowedIPs' => ['*'],
  74.     ];
  75.  
  76.     $config['bootstrap'][] = 'gii';
  77.     $config['modules']['gii'] = [
  78.         'class' => 'yii\gii\Module',
  79.         // uncomment the following to add your IP if you are not connecting from localhost.
  80.         'allowedIPs' => ['*'],
  81.     ];
  82. }
  83.  
  84. return $config;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement