Sistem untuk admin DUN merekod waktu KTM (Ketua Tempat Mengundi) hadir mengambil peti undi. Data KTM dibaca daripada DB sppm (spr2026) melalui connection kedua — hanya penempatan berjawatan KTM yang dipaparkan. - Dashboard: senarai KTM ikut pusat mengundi (asc) & saluran (asc), status BELUM HADIR (merah) / HADIR (hijau) + tarikh & masa - Carian nama/no. KP, tapisan pusat mengundi & status - Tanda hadir / batal dengan kawalan DUN (admin terhad ke DUN sendiri) - Eksport Excel (worksheet Hadir & Belum Hadir) guna SimpleXlsx - Peranan: superadmin (urus pengguna, semua DUN) & admin DUN - Docker: nginx + php-fpm + queue + scheduler + webhook deploy, port 127.0.0.1:8009, TZ Asia/Kuala_Lumpur di semua container - Zon waktu aplikasi: Asia/Kuala_Lumpur (APP_TIMEZONE) Berasaskan scaffold spr2026_taklimat. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace Database\Seeders;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
|
use Illuminate\Database\Seeder;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
class DatabaseSeeder extends Seeder
|
|
{
|
|
use WithoutModelEvents;
|
|
|
|
/**
|
|
* Seed the application's database.
|
|
*/
|
|
public function run(): void
|
|
{
|
|
User::updateOrCreate(
|
|
['email' => 'superadmin@spr.gov.my'],
|
|
[
|
|
'name' => 'Superadmin',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'superadmin',
|
|
'dun_id' => null,
|
|
],
|
|
);
|
|
|
|
// Admin DUN — dun_id merujuk kepada sppm.dun.id
|
|
User::updateOrCreate(
|
|
['email' => 'admin.n49@spr.gov.my'],
|
|
[
|
|
'name' => 'Admin DUN N49',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'admin',
|
|
'dun_id' => 1,
|
|
],
|
|
);
|
|
|
|
User::updateOrCreate(
|
|
['email' => 'admin.n48@spr.gov.my'],
|
|
[
|
|
'name' => 'Admin DUN N48',
|
|
'password' => Hash::make('password'),
|
|
'role' => 'admin',
|
|
'dun_id' => 2,
|
|
],
|
|
);
|
|
}
|
|
}
|