<?php return ['class' => common\components\MultiLingualUrlManager::className(), 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [['pattern' => '/<language:[a-z]{2}-[A-Z]{2}>', 'route' => 'site/index', 'suffix' => '/'], ['pattern' => '/<language:[a-z]{2}-[A-Z]{2}>/blog/tag/<tag>', 'route' => 'blog/index'], 'blog/tag/<tag>' => 'blog/index', ['pattern' => '/<language:[a-z]{2}-[A-Z]{2}>/blog', 'route' => 'blog/index', 'suffix' => '/'], ['pattern' => '/blog', 'route' => 'blog/index', 'suffix' => '/'], '<language>/blog/<slug>' => 'blog/view', 'blog/<slug>' => 'blog/view', '<language>/blog/category/<slug>' => 'blog/category-index', 'blog/category/<slug>' => 'blog/category-index', ['class' => 'frontend\\components\\FlatPageUrlRule'], '<language>/<action>' => 'site/<action>', '/' => 'site/index', '<action>' => 'site/<action>', '<language>/<controller>/<action>/<id>' => '<controller>/<action>', '<language>/<controller>/<action>' => '<controller>/<action>', '<language>/<controller>/<id>' => '<controller>']];
<?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-backend', 'name' => 'HeavyCMS', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'backend\\controllers', 'bootstrap' => ['log'], 'language' => 'en-US', 'modules' => [], 'components' => ['user' => ['identityClass' => 'common\\models\\User', 'enableAutoLogin' => true], 'i18n' => ['translations' => ['*' => ['class' => 'yii\\i18n\\PhpMessageSource', 'basePath' => '@backend/messages', 'sourceLanguage' => 'en-US', 'fileMap' => ['general' => 'general.php']]]], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'errorHandler' => ['errorAction' => 'site/error'], 'assetManager' => ['bundles' => ['dmstr\\web\\AdminLteAsset' => ['skin' => 'skin-red-light']]], 'urlManager' => ['class' => common\components\MultiLingualUrlManager::className(), 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => ['<language>/<controller>/<action>/<id>' => '<controller>/<action>', '<language>/<controller>/<action>' => '<controller>/<action>', '<language>/<controller>/<id>' => '<controller>']], 'mailer' => ['class' => 'yii\\swiftmailer\\Mailer', 'viewPath' => '@backend/mail']], 'params' => $params];
<?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' => ['identityClass' => 'common\\models\\User', 'enableAutoLogin' => true], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'errorHandler' => ['errorAction' => 'site/error'], 'i18n' => ['translations' => ['*' => ['class' => yii\i18n\DbMessageSource::className(), 'sourceLanguage' => 'en-US', 'forceTranslation' => true, 'sourceMessageTable' => '{{%source_message}}', 'messageTable' => '{{%translated_message}}']]], 'urlManager' => ['class' => common\components\MultiLingualUrlManager::className(), 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [['pattern' => '/<language:[a-z]{2}-[A-Z]{2}>', 'route' => 'site/index', 'suffix' => '/'], '<language>/<action>' => 'site/<action>', '/' => 'site/index', '<action>' => 'site/<action>', '<language>/<controller>/<action>/<id>' => '<controller>/<action>', '<language>/<controller>/<action>' => '<controller>/<action>', '<language>/<controller>/<id>' => '<controller>']], 'mailer' => ['class' => 'yii\\swiftmailer\\Mailer', 'viewPath' => '@frontend/mail']], 'params' => $params];