Ejemplo n.º 1
0
<?php

$languages = (require __DIR__ . '/languages.php');
$config = ['projectName' => 'My Project', 'RegistrationNeedsActivation' => false, 'LoginWithEmail' => true, 'ForceStrongPassword' => false, 'user.passwordResetTokenExpire' => 3600, 'adminEmail' => '*****@*****.**', 'supportEmail' => '*****@*****.**', 'app.urlManager' => ['class' => yii\web\UrlManager::className(), 'enablePrettyUrl' => true, 'showScriptName' => false], 'app.urlManager.localeUrls' => ['class' => codemix\localeurls\UrlManager::className(), 'enablePrettyUrl' => true, 'showScriptName' => false, 'enableDefaultLanguageUrlCode' => true, 'enableLanguagePersistence' => true, 'enableLanguageDetection' => true, 'languages' => $languages], 'app.giiModule' => ['class' => yii\gii\Module::className(), 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*']], 'app.fileCache' => ['class' => yii\caching\FileCache::className()], 'app.redisCache' => [], 'app.assetManager' => ['appendTimestamp' => true, 'converter' => ['class' => common\assets\AppAssetConvertor::className()], 'bundles' => ['yii\\bootstrap\\BootstrapAsset' => ['css' => []]]], 'app.authManager' => ['class' => yii\rbac\DbManager::className(), 'cache' => 'cache'], 'app.mail' => ['class' => yii\swiftmailer\Mailer::className(), 'viewPath' => '@common/mails', 'useFileTransport' => true], 'app.i18n' => ['class' => uran1980\yii\modules\i18n\components\I18N::className(), 'languages' => $languages, 'format' => 'db', 'sourcePath' => [__DIR__ . '/../../frontend', __DIR__ . '/../../backend', __DIR__ . '/../../common'], 'messagePath' => __DIR__ . '/../../messages', 'translations' => ['*' => ['class' => yii\i18n\DbMessageSource::className(), 'enableCaching' => true, 'cachingDuration' => 60 * 60 * 2]]], 'app.debugModule' => ['class' => yii\debug\Module::className(), 'controllerMap' => ['default' => common\modules\debug\controllers\DefaultController::className()], 'panels' => ['log' => ['class' => common\modules\debug\panels\LogPanel::className()], 'dbLogs' => ['class' => common\modules\debug\panels\DbLogPanel::className()], 'views' => ['class' => common\modules\debug\panels\ViewsPanel::className()], 'devInfo' => ['class' => common\modules\debug\panels\DevInfoPanel::className()]]]];
return $config;
Ejemplo n.º 2
0
<?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', 'basePath' => dirname(__DIR__), 'controllerNamespace' => 'backend\\controllers', 'bootstrap' => ['log'], 'modules' => ['gii' => ['class' => yii\gii\Module::className(), 'allowedIPs' => ['127.0.0.1', '127.0.1.1', '192.168.122.1', '10.0.3.1', '::1']], 'debug' => ['class' => yii\debug\Module::className(), 'allowedIPs' => ['127.0.0.1', '127.0.1.1', '192.168.122.1', '10.0.3.1', '::1']]], 'components' => ['user' => ['identityClass' => 'common\\models\\User', 'enableAutoLogin' => true], 'assetManager' => ['bundles' => ['dmstr\\web\\AdminLteAsset' => ['skin' => 'skin-blue']]], 'log' => ['traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [['class' => 'yii\\log\\FileTarget', 'levels' => ['error', 'warning']]]], 'errorHandler' => ['errorAction' => 'site/error']], 'params' => $params];