Advertisement
Guest User

Untitled

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