Added Notifications

This commit is contained in:
2026-05-10 22:42:37 +10:00
parent 016e752dcd
commit c7fe3268c7
18 changed files with 1386 additions and 50 deletions
@@ -29,6 +29,7 @@ class HandleInertiaRequests extends Middleware
*/
public function share(Request $request): array
{
return [
...parent::share($request),
'logo_api_url' => config('app.logo_api_url'),
@@ -44,6 +45,11 @@ class HandleInertiaRequests extends Middleware
->latest()
->get()
: [],
'unread_notification_count' => $request->user()?->notifications()
->whereNull('read_at')
->whereNull('expires_at')
->orWhere('expires_at', '>', now())
->count(),
];
}
}