fix a bug

This commit is contained in:
Wisp X 2022-03-23 17:31:03 +08:00
parent 317c2ea369
commit a2a45e72ba
3 changed files with 3 additions and 3 deletions

View File

@ -83,7 +83,7 @@ class Group extends Model
*/ */
public static function getDefaultConfigs(): Collection public static function getDefaultConfigs(): Collection
{ {
return collect(config('convention.app.group')); return collect(config('convention.group'));
} }
public function users(): HasMany public function users(): HasMany

View File

@ -35,7 +35,7 @@ class InstallSeeder extends Seeder
'name' => '系统默认组&游客组', 'name' => '系统默认组&游客组',
'is_default' => true, 'is_default' => true,
'is_guest' => true, 'is_guest' => true,
'configs' => config('convention.app.group'), 'configs' => config('convention.group'),
]); ]);
// 创建默认策略 // 创建默认策略
$group->strategies()->create([ $group->strategies()->create([

View File

@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Route;
use App\Enums\GroupConfigKey; use App\Enums\GroupConfigKey;
use App\Enums\ConfigKey; 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) { Route::middleware('cache.headers:public;max_age=2628000;etag')->group(function () use ($extensions) {
$extensions = array_merge(array_map('strtoupper', $extensions), array_map('strtolower', $extensions)); $extensions = array_merge(array_map('strtoupper', $extensions), array_map('strtolower', $extensions));
Route::any('{key}.{extension}', [ Route::any('{key}.{extension}', [