<?php
require 'vendor/autoload.php';
$app = require_once 'bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$kernel->handle(Illuminate\Http\Request::capture());

$users = App\Models\User::where('role', 'user')->get();
foreach($users as $u) {
    $penugasan = App\Models\Penugasan::first();
    if (!$penugasan) {
        $penugasan = App\Models\Penugasan::create(['kegiatan' => 'Monitoring Internal', 'status' => 'selesai', 'tanggal_mulai' => now(), 'created_by' => 1]);
    }
    $u->notify(new App\Notifications\PenugasanStatusNotification($penugasan, 'selesai', 'disetujui'));
}
echo "Notifikasi dummy berhasil ditambahkan!\n";
