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}', [