正在显示
1 个修改的文件
包含
6 行增加
和
1 行删除
| @@ -84,11 +84,16 @@ class Application | @@ -84,11 +84,16 @@ class Application | ||
| 84 | */ | 84 | */ |
| 85 | protected function configure(string $app = 'default'): Option | 85 | protected function configure(string $app = 'default'): Option |
| 86 | { | 86 | { |
| 87 | - $configure = \config(ServiceProvider::$name . '.' . $app, []); | 87 | + $configure = \config(ServiceProvider::$name . '.' . $app); |
| 88 | + | ||
| 89 | + if (is_null($configure)) { | ||
| 90 | + throw new \InvalidArgumentException('Please publish the configuration file first'); | ||
| 91 | + } | ||
| 88 | 92 | ||
| 89 | return static::newConfigFormArray($configure); | 93 | return static::newConfigFormArray($configure); |
| 90 | } | 94 | } |
| 91 | 95 | ||
| 96 | + | ||
| 92 | /** | 97 | /** |
| 93 | * Load configuration to object Option | 98 | * Load configuration to object Option |
| 94 | * | 99 | * |
-
请 注册 或 登录 后发表评论