mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Refactored app bootstrap logic.
This commit is contained in:
@ -10,6 +10,7 @@ return [
|
||||
'id' => 'app-backend',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'controllerNamespace' => 'backend\controllers',
|
||||
'bootstrap' => ['log'],
|
||||
'modules' => [],
|
||||
'components' => [
|
||||
'user' => [
|
||||
|
||||
@ -9,6 +9,7 @@ $params = array_merge(
|
||||
return [
|
||||
'id' => 'app-console',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'controllerNamespace' => 'console\controllers',
|
||||
'modules' => [],
|
||||
'components' => [
|
||||
|
||||
@ -9,6 +9,7 @@ $params = array_merge(
|
||||
return [
|
||||
'id' => 'app-frontend',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'controllerNamespace' => 'frontend\controllers',
|
||||
'components' => [
|
||||
'user' => [
|
||||
|
||||
@ -8,6 +8,7 @@ $db = require(__DIR__ . '/db.php');
|
||||
return [
|
||||
'id' => 'basic-console',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'controllerNamespace' => 'app\commands',
|
||||
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
|
||||
'components' => [
|
||||
|
||||
@ -6,6 +6,7 @@ $db = require(__DIR__ . '/db.php');
|
||||
$config = [
|
||||
'id' => 'basic',
|
||||
'basePath' => dirname(__DIR__),
|
||||
'bootstrap' => ['log'],
|
||||
'extensions' => require(__DIR__ . '/../vendor/yiisoft/extensions.php'),
|
||||
'components' => [
|
||||
'cache' => [
|
||||
|
||||
Reference in New Issue
Block a user