@extends('layouts.app') @section('content')

Notification Management

Send notifications to users across the portal

add Send Notification

Total Sent

{{ \DB::table('notifications')->count() }}

send

Active Users

{{ \App\Models\User::count() + \App\Models\Staff::where('is_confirmed', true)->count() + \App\Models\Student::where('is_confirmed', true)->count() }}

people

Today's Sent

{{ \DB::table('notifications')->whereDate('created_at', today())->count() }}

today

Recent Notifications

View All
@php $recentNotifications = \DB::table('notifications')->latest()->take(10)->get(); @endphp @forelse($recentNotifications as $notification)
{{ json_decode($notification->data)->icon ?? 'notifications' }}

{{ json_decode($notification->data)->title ?? 'Notification' }}

{{ json_decode($notification->data)->message ?? '' }}

{{ \Carbon\Carbon::parse($notification->created_at)->diffForHumans() }}

@empty
notifications_none

No notifications sent yet

@endforelse
@endsection