All Notification List
- Notification Management
- Notification
@if ($notification->isNotEmpty())
-
@foreach ($notification as $notify)
@php
$nameParts = explode(' ', $notify->user_name);
$initials = '';
// Get the first letter of the first two words
if (!empty($nameParts[0])) {
$initials .= strtoupper($nameParts[0][0]);
}
if (!empty($nameParts[1])) {
$initials .= strtoupper($nameParts[1][0]);
}
// If initials are empty, set a default value
if (empty($initials)) {
$initials = 'N/A';
}
$notifyURL = $notify->link ? $notify->link : 'javascript:;';
@endphp
-
{{ $initials }}
{{ $notify->message }}
{{ \Carbon\Carbon::parse($notify->created_at)->format('d M Y h:i A') }}
@endforeach
{{ $notification->links() }}
@else
No notification records found!
@endif