@extends('layouts.app') @section('title', 'Notifications') @section('content')

Notifications

@if($unreadCount > 0) {{ $unreadCount }} unread notification{{ $unreadCount > 1 ? 's' : '' }} @else You're all caught up @endif

@if($unreadCount > 0)
@csrf
@endif
@if(session('success'))
{{ session('success') }}
@endif
@forelse($notifications as $notification) @php $data = $notification->data ?? []; $level = data_get($data, 'level', 'info'); if (!in_array( $level, ['success', 'warning', 'error', 'info'], true )) { $level = 'info'; } $title = data_get( $data, 'title', 'Notification' ); $message = data_get( $data, 'message', '' ); $loanId = data_get( $data, 'loan_id' ); $loanNumber = data_get( $data, 'loan_number' ); @endphp
{{ $title }}
{{ $level }}
{{ $message }}
{{ $notification->created_at?->format('d M Y, h:i A') ?? '' }} @if($loanNumber) ยท {{ $loanNumber }} @endif
@if(!$notification->read_at || $loanId)
@csrf
@endif
@empty
๐Ÿ”” No notifications New loan and payment updates will appear here.
@endforelse
@if($notifications->hasPages()) @endif
@endsection