$params['default_language'], 'id' => 'basic', 'basePath' => dirname(__DIR__), 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'cWnCnH7Uw0YFwXuqQNBcSDRZ1LuCYlcR', 'enableCsrfValidation' => false, ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, ], 'errorHandler' => [ 'errorAction' => 'site/error', 'maxSourceLines' => 20, ], 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', // send all mails to a file by default. You have to set // 'useFileTransport' to false and configure a transport // for the mailer to send real emails. 'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => $db, 'db_settlements' => $db_settlements, 'db_register' => $db_register, 'db_phplist' => $db_phplist, 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'suffix' => '/', 'rules' => [ /* Web site */ //region [IMAGES] '/get-img/' => '/file/get-img', '/remove-img' => '/file/remove-img', '/upload-crop' => '/file/upload-crop', '/delete-crop' => '/file/delete-crop', '/upload-file-cms' => '/file/upload-file-cms', '/delete-file-cms' => '/file/delete-file-cms', '/update-file-indexes' => '/file/update-file-indexes', '/clear-file-temporary' => '/file/clear-temporary', //endregion //region [API] '/api/' => '/api/', '/api//' => '/api/', '/api-sync//' => '/api-sync/', '/settlements/' => '/settlements/', '/media/' => '/media/', '/media//' => '/media/', //endregion //region [REMOTE] '/new-article-position' => '/remote/new-article-position', '/get-article-positions' => '/remote/get-article-positions', '/update-article-position' => '/remote/update-article-position', '/update-positions-indexes/' => '/remote/update-positions-indexes/', '/update-list-indexes' => '/remote/update-list-indexes', '/new-sub-category' => '/remote/new-sub-category', '/update-category-indexes' => '/remote/update-category-indexes', '/new-common-field-option' => '/remote/new-common-field-option', '/update-common-field-indexes' => '/remote/update-common-field-indexes', '/remote/help-keys-remote/' => '/remote/help-keys-remote', '/remote/change-locale/' => '/remote/change-locale', '/new-dynamic-field' => '/remote/new-dynamic-field', '/update-dynamic-fields-indexes' => '/remote/update-dynamic-fields-indexes', '/update-dynamic-type-values' => '/remote/update-dynamic-type-values', '/get-object-types' => '/remote/get-object-types', '/get-history' => '/remote/get-history', //endregion '/' => '/public/index', //region [ADMIN GLOBAL] '/cms-admin' => '/public/admin-global-login', '/admin-global' => '/public/admin-register-login', '/admin-global/logout' => '/admin-global/logout', '/admin-global//' => '/admin-global/', //endregion //region [ADMIN CMS] '/admin-cms' => '/public/admin-cms-login', '/admin-cms/logout' => '/admin-cms/logout', '/admin-cms//' => '/admin-cms/', //endregion //region [PARTNER] //'/partner' => '/public/partner-login', '/partner' => '/public/partner-register-login', '/partner-register-login' => '/public/partner-register-login', '/admin-register-login' => '/public/admin-register-login', 'partner/logout' => 'partner/logout', '/partner//' => '/partner/', //endregion '/cms-logout' => '/public/cms-logout' ] ], 'i18n' => [ 'translations' => [ '*' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@app/translations', ], ], ] ], 'params' => $params, ]; if (YII_ENV_DEV) { // configuration adjustments for 'dev' environment $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ]; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', // uncomment the following to add your IP if you are not connecting from localhost. //'allowedIPs' => ['127.0.0.1', '::1'], ]; } return $config;