first commit
This commit is contained in:
51
database/seeders/AppSettingsSeeder.php
Normal file
51
database/seeders/AppSettingsSeeder.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\AppSetting;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class AppSettingsSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$settings = [
|
||||
[
|
||||
'key' => 'default_cut_off_day',
|
||||
'value' => '1',
|
||||
'type' => 'integer',
|
||||
'group' => 'kitaran',
|
||||
'label' => 'Hari tarikh tutup lalai',
|
||||
'description' => 'Hari bulan tarikh tutup serahan lalai (cth: 1).',
|
||||
],
|
||||
[
|
||||
'key' => 'default_cut_off_month',
|
||||
'value' => '12',
|
||||
'type' => 'integer',
|
||||
'group' => 'kitaran',
|
||||
'label' => 'Bulan tarikh tutup lalai',
|
||||
'description' => 'Bulan tarikh tutup serahan lalai (cth: 12 = Disember). Pembaharuan lesen pada/sebelum 1 Disember.',
|
||||
],
|
||||
[
|
||||
'key' => 'reminder_email_enabled',
|
||||
'value' => '0',
|
||||
'type' => 'boolean',
|
||||
'group' => 'peringatan',
|
||||
'label' => 'Hantar peringatan emel',
|
||||
'description' => 'Aktifkan penghantaran peringatan emel (perlu konfigurasi SMTP).',
|
||||
],
|
||||
[
|
||||
'key' => 'max_upload_size_kb',
|
||||
'value' => '20480',
|
||||
'type' => 'integer',
|
||||
'group' => 'dokumen',
|
||||
'label' => 'Saiz maksimum muat naik (KB)',
|
||||
'description' => 'Had saiz fail PDF yang boleh dimuat naik dalam KB.',
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($settings as $s) {
|
||||
AppSetting::firstOrCreate(['key' => $s['key']], $s);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user