Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?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',
- 'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '180.211.110.194'] // adjust this to your needs
- ],
- ],
- */
- 'modules' => [
- 'settings' => [
- 'class' => 'backend\modules\settings\Settings',
- ],
- ],
- 'components' => [
- 'user' => [
- 'identityClass' => 'backend\models\Admin',
- 'enableAutoLogin' => true,
- 'enableSession' => true,
- 'identityCookie' => [
- 'name' => '_backendUser', // unique for backend
- ],
- ],
- 'session' => [
- 'name' => 'PHPBACKSESSID',
- 'savePath' => sys_get_temp_dir(),
- ],
- 'request' => [
- // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
- 'cookieValidationKey' => 'qqsdfsdzgsdfgsdgsdgqq',
- 'csrfParam' => '_backendCSRF',
- ],
- 'log' => [
- 'traceLevel' => YII_DEBUG ? 3 : 0,
- 'targets' => [
- [
- 'class' => 'yii\log\FileTarget',
- 'levels' => ['error', 'warning'],
- ],
- ],
- ],
- 'errorHandler' => [
- 'errorAction' => 'site/error',
- ],
- ],
- 'params' => $params,
- ];
Add Comment
Please, Sign In to add comment