/
chieforik
/
AgroPro
Обзор
Документация
Войти
/
chieforik
/
AgroPro
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
config/web.php
89 строк
3 KB
Орловский Александр
Первый
25 сен 2025, 02:26
25 сен 2025, 02:26
1567008
Код
Авторство
О чём код?
<?php $params = require __DIR__ . '/params.php'; $db = require __DIR__ . '/db.php'; $config = [ 'id' => 'basic', 'basePath' => dirname(__DIR__), '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' => 'X5itzGPtvh4HQ0HETnt2eaneOFv78BgC', ], 'gigaChat' => [ 'class' => 'app\services\GigaChatService', 'clientId' => '14a8e20b-aaeb-4e48-baa1-40dc315a7344', 'clientSecret' => '3350788e-4d19-492a-a8fe-58aad020cd8c', ], 'cache' => [ 'class' => 'yii\caching\FileCache', ], 'user' => [ 'identityClass' => 'app\models\User', 'enableAutoLogin' => true, ], 'name' => 'АгроПро', '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' => [ 'index' => 'giga-chat/index', 'field' => 'giga-chat/field', 'field-detail' => 'giga-chat/field-detail', 'field-form' => 'giga-chat/field-form', 'field-view' => 'giga-chat/field-view', 'fields' => 'giga-chat/fields', 'reports' => 'giga-chat/reports', 'calc' => 'giga-chat/calc', 'market' => 'giga-chat/market', 'giga-chat/send-message' => 'giga-chat/send-message', ], ], ], '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;