/
i-panov
/
php-library-manager
Обзор
Документация
Войти
/
i-panov
/
php-library-manager
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/config/web.php
72 строки
2 KB
i.panov
view
19 мар 2025, 11:37
19 мар 2025, 11:37
e8146d7
Код
Авторство
О чём код?
<?php $params = require __DIR__ . '/params.php'; $db = require __DIR__ . '/db.php'; $config = [ 'id' => 'books_task', 'basePath' => dirname(__DIR__), 'language' => 'ru_RU', 'name' => 'Books task', 'bootstrap' => ['log'], 'aliases' => [ '@bower' => '@vendor/bower-asset', '@npm' => '@vendor/npm-asset', ], 'components' => [ 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => 'd7GDLu7q2C-t8rRoBneR_JdwHQh-MDX1', ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, 'loginUrl' => ['admin/login'], ], 'errorHandler' => [ 'errorAction' => 'site/error', ], 'mailer' => [ 'class' => \yii\symfonymailer\Mailer::class, 'viewPath' => '@app/mail', // send all mails to a file by default. 'useFileTransport' => true, ], 'log' => [ 'traceLevel' => YII_DEBUG ? 3 : 0, 'targets' => [ [ 'class' => 'yii\log\FileTarget', 'levels' => ['error', 'warning'], ], ], ], 'db' => $db, 'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ ], ], ], 'params' => $params, ]; if (YII_ENV_DEV) { $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', 'allowedIPs' => ['*'], ]; $config['bootstrap'][] = 'gii'; $config['modules']['gii'] = [ 'class' => 'yii\gii\Module', 'allowedIPs' => ['*'], ]; } return $config;