config.blade.php as default config view file name.

This commit is contained in:
Pig Fang 2019-07-26 16:26:50 +08:00
parent d41bbe201c
commit 80cc47279f
3 changed files with 12 additions and 2 deletions

View File

@ -135,12 +135,14 @@ class Plugin
public function getConfigView()
{
return $this->hasConfigView() ? view()->file($this->getViewPathByFileName(Arr::get($this->packageInfo, 'config'))) : null;
return $this->hasConfigView()
? view()->file($this->getViewPathByFileName(Arr::get($this->packageInfo, 'config', 'config.blade.php')))
: null;
}
public function hasConfigView(): bool
{
$filename = Arr::get($this->packageInfo, 'config');
$filename = Arr::get($this->packageInfo, 'config', 'config.blade.php');
return $filename && file_exists($this->getViewPathByFileName($filename));
}

View File

@ -1,3 +1,7 @@
## Added
- Plugin system: `config.blade.php` as default config file name.
## Fixed
- Some fields at administration panel shouldn't be sortable.

View File

@ -1,3 +1,7 @@
## 新增
- 插件系统:`config.blade.php` 为默认情况下配置视图文件名
## 修复
- 管理面板的列表中某些字段不应是可排序的