@php
$auth_user = auth()->user();
$notifications = $auth_user->unreadNotifications->take(5);
if(!isset($count_notification)){
$count_notification = $auth_user->unreadNotifications->count();
}
@endphp
@if($count_notification)
@foreach($notifications as $notification)
@php
$notification_message = ($notification->data&&isset($notification->data['notification_message'])?$notification->data['notification_message']:'');
$notification_url = ($notification->data&&isset($notification->data['notification_url'])&&!empty($notification->data['notification_url'])?$notification->data['notification_url']:route("{$jobapp_identifier}.backend.notification.index"));
$notification_url = str_replace(['http://localhost', 'https://localhost', '//localhost'], url('/'), $notification_url);
$notification_url = route("{$jobapp_identifier}.backend.notification.index", ['read' => $notification->id, 'redirect' => encrypt_decrypt($notification_url)]);
@endphp
{!! \Str::limit(strip_tags(clean_html($notification_message)), 100) !!} {{ $notification->updated_at->format('d M y H:i') }} ({{ $notification->updated_at->diffForHumans() }})