From a2a45e72bae7c9cf40f3563747cf3717d35edea3 Mon Sep 17 00:00:00 2001 From: Wisp X <1591788658@qq.com> Date: Wed, 23 Mar 2022 17:31:03 +0800 Subject: [PATCH] fix a bug --- app/Models/Group.php | 2 +- database/seeders/InstallSeeder.php | 2 +- routes/image.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Group.php b/app/Models/Group.php index 92121466..4a64dd6b 100644 --- a/app/Models/Group.php +++ b/app/Models/Group.php @@ -83,7 +83,7 @@ class Group extends Model */ public static function getDefaultConfigs(): Collection { - return collect(config('convention.app.group')); + return collect(config('convention.group')); } public function users(): HasMany diff --git a/database/seeders/InstallSeeder.php b/database/seeders/InstallSeeder.php index 9f83d2fa..a159a4d0 100644 --- a/database/seeders/InstallSeeder.php +++ b/database/seeders/InstallSeeder.php @@ -35,7 +35,7 @@ class InstallSeeder extends Seeder 'name' => '系统默认组&游客组', 'is_default' => true, 'is_guest' => true, - 'configs' => config('convention.app.group'), + 'configs' => config('convention.group'), ]); // 创建默认策略 $group->strategies()->create([ diff --git a/routes/image.php b/routes/image.php index 0d8afb6f..f7935ecc 100644 --- a/routes/image.php +++ b/routes/image.php @@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Route; use App\Enums\GroupConfigKey; use App\Enums\ConfigKey; -$extensions = config('convention.app.'.ConfigKey::Group)[GroupConfigKey::AcceptedFileSuffixes]; +$extensions = config('convention.group.accepted_file_suffixes'); Route::middleware('cache.headers:public;max_age=2628000;etag')->group(function () use ($extensions) { $extensions = array_merge(array_map('strtoupper', $extensions), array_map('strtolower', $extensions)); Route::any('{key}.{extension}', [