fix: implementasi FilamentUser interface agar panel bisa diakses di production
- Tambah FilamentUser interface di User model - Tambah canAccessPanel() method - Tambah VoteObserver: broadcast notifikasi ke semua user saat vote baru - Tambah NotificationService::toAll() - Fix Vote model: auto-fill created_by via booted() - Fix CashRecordObserver: fallback created_by untuk Vote
This commit is contained in:
@@ -33,4 +33,9 @@ class NotificationService
|
||||
if ($users->isEmpty()) return;
|
||||
self::send($users, $title, $body, $color, $url);
|
||||
}
|
||||
|
||||
public static function toAll(string $title, string $body, string $color = 'info', ?string $url = null): void
|
||||
{
|
||||
self::send(User::all(), $title, $body, $color, $url);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user