fix query scraping using upsert and connect dashboard
This commit is contained in:
@@ -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"),
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user