add value host email and password from db global settings table

This commit is contained in:
arifal
2025-01-27 19:46:45 +07:00
parent 82ab44cfb6
commit 8b77e748ca
7 changed files with 103 additions and 17 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Database\Seeders;
use App\Models\GlobalSetting;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Carbon\Carbon;
class GlobalSettingSeeder extends Seeder
{
/**
* Run the database seeds.
*/
public function run(): void
{
$globalSettings = [
[
"key" => "SIMBG_HOST",
"value" => "https://simbg.pu.go.id",
"type" => "string",
"description" => "Host SIMBG",
"created_at" => Carbon::now()->format("Y-m-d H:i:s"),
"updated_at" => Carbon::now()->format("Y-m-d H:i:s"),
],
[
"key" => "SIMBG_PASSWORD",
"value" => "Simbg123",
"type" => "string",
"description" => "Password SIMBG",
"created_at" => Carbon::now()->format("Y-m-d H:i:s"),
"updated_at" => Carbon::now()->format("Y-m-d H:i:s"),
],
[
"key" => "SIMBG_EMAIL",
"value" => "dputr@bandungkab.go.id",
"type" => "string",
"description" => "Email SIMBG",
"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);
}
}