add notifications logic and add support of both JWT and Sanctum

This commit is contained in:
root
2026-03-11 01:20:31 -04:00
parent f6be51576c
commit 182036cc41
141 changed files with 8685 additions and 648 deletions
@@ -0,0 +1,27 @@
<?php
namespace App\Services\Notifications;
use App\Models\Notification;
class NotificationDeletedService
{
public function list(): array
{
$rows = Notification::getDeletedNotifications();
$notifications = array_map(static function ($row) {
return [
'id' => $row['id'] ?? null,
'title' => $row['title'] ?? null,
'message' => $row['message'] ?? null,
'priority' => $row['priority'] ?? null,
'scheduled_at' => $row['scheduled_at'] ?? null,
'expires_at' => $row['expires_at'] ?? null,
'deleted_at' => $row['deleted_at'] ?? null,
];
}, $rows ?? []);
return ['notifications' => $notifications];
}
}