fix: 安装系统部分情况没有数据

This commit is contained in:
Pang 2024-04-26 19:46:27 +08:00
parent f6afdd6604
commit b81f2f0675

View File

@ -15,9 +15,13 @@ class SettingsTableSeeder extends Seeder
public function run() public function run()
{ {
$system = \DB::table('settings')->where('name', 'system')->first();
if (\DB::table('settings')->where('name', 'system')->count() > 0) { if ($system) {
return; $system = json_decode($system->setting, true);
if (isset($system['reg'])) {
return;
}
\DB::table('settings')->delete();
} }
\DB::table('settings')->insert(array ( \DB::table('settings')->insert(array (