fix query scraping using upsert and connect dashboard

This commit is contained in:
arifal
2025-01-30 22:57:15 +07:00
parent 1f6ef5f110
commit d70fefb12d
9 changed files with 1113 additions and 976 deletions

View File

@@ -39,7 +39,26 @@ class GlobalSettingSeeder extends Seeder
"created_at" => Carbon::now()->format("Y-m-d H:i:s"),
"updated_at" => Carbon::now()->format("Y-m-d H:i:s"),
],
[
"key" => "FETCH_PER_PAGE",
"value" => "100",
"type" => "integer",
"description" => "Total data per page",
"created_at" => Carbon::now()->format("Y-m-d H:i:s"),
"updated_at" => Carbon::now()->format("Y-m-d H:i:s"),
],
];
GlobalSetting::insert($globalSettings);
foreach($globalSettings as $setting){
GlobalSetting::updateOrCreate(
["key" => $setting["key"]],
[
"value" =>$setting["value"],
"type" => $setting["type"],
"description" => $setting["description"],
"created_at" => Carbon::now()->format("Y-m-d H:i:s"),
"updated_at" => Carbon::now()->format("Y-m-d H:i:s"),
]
);
}
}
}