Blame view

frontend/config/main.php 2.31 KB
a63b5418   Administrator   first_commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
  <?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-frontend',
      'basePath' => dirname(__DIR__),
      'bootstrap' => ['log'],
      'controllerNamespace' => 'frontend\controllers',
      'components' => [
          'user' => [
27b0cb06   Administrator   VItaliy 02.12.2015
16
              'identityClass' => 'common\models\Accounts',
a63b5418   Administrator   first_commit
17
              'enableAutoLogin' => true,
27b0cb06   Administrator   VItaliy 02.12.2015
18
19
20
              'identityCookie' => [
                  'name' => '_frontendUser', // unique for frontend
              ]
a63b5418   Administrator   first_commit
21
          ],
2509e17e   Administrator   JSON
22
          'request'=>[
27b0cb06   Administrator   VItaliy 02.12.2015
23
24
              'cookieValidationKey' => 'ndahjhjjidasuidrqeswuiuirqw89',
              'csrfParam' => '_frontendCSRF',
2509e17e   Administrator   JSON
25
26
27
28
29
              'class' => 'common\components\Request',
  
              'web'=> '/frontend/web'
  
          ],
27b0cb06   Administrator   VItaliy 02.12.2015
30
31
32
33
34
          'session' => [
              'name' => 'PHPFRONTSESSID',
              'savePath' => __DIR__ . '/../tmp',
  
          ],
a63b5418   Administrator   first_commit
35
36
37
38
39
40
41
42
43
44
45
46
          'log' => [
              'traceLevel' => YII_DEBUG ? 3 : 0,
              'targets' => [
                  [
                      'class' => 'yii\log\FileTarget',
                      'levels' => ['error', 'warning'],
                  ],
              ],
          ],
          'errorHandler' => [
              'errorAction' => 'site/error',
          ],
2509e17e   Administrator   JSON
47
  
85b72093   Administrator   first commit from...
48
49
50
51
52
          'urlManager' => [
              'baseUrl' => '/',
              'enablePrettyUrl' => true,
              'showScriptName' => false,
              'rules' => [
25545a10   Administrator   VItaliy 30.11.2015
53
                  'news/<translit:[\w-]+>' => 'news/view',
85b72093   Administrator   first commit from...
54
                  'news' => 'news/index',
a1e4a116   Administrator   VItaliy 27.11.2015
55
                  'page/<translit:[\w-]+>'=>'page/view',
25545a10   Administrator   VItaliy 30.11.2015
56
                  'company/<translit:[\w-]+>'=>'page/about',
85b72093   Administrator   first commit from...
57
58
59
60
61
62
63
64
65
66
67
68
                  'goods/one-item/<translit:[\w-]+>'=>'goods/one-item',
                  'goods/view/<translit:[\w-]+>'=>'goods/view',
                  'stone/view/<translit:[\w-]+>'=>'stone/view',
                  'events/view/<translit:[\w-]+>'=>'events/view',
                  'standard-services/view/<translit:[\w-]+>'=>'standard-services/view',
                  'f/<filter:([\w\=\;\/\-\_]+)?>'=>'stone/ajax-filter',
                  'search'=>'site/search',
                  'contact'=>'site/contact',
                  'about'=>'site/about',
                  'success'=>'site/success',
              ]
          ]
2509e17e   Administrator   JSON
69
  
a63b5418   Administrator   first_commit
70
71
72
      ],
      'params' => $params,
  ];