@php $doctor = auth('client')->user(); $notifications = MemberNotification:: where('member_id', $doctor->id) ->where('member_type', $doctor->position=="doctor"?'Doctor':"Assistant") // Doctor / Assistant / Patient -> whereNull('read_at') // بس اللي لسه متقراش ->latest() ->get(); @endphp @if($notifications->count() > 0)
@foreach($notifications as $notif)
{{ $notif->title }} : {{ \Illuminate\Support\Str::limit($notif->body, 60) }} {{ $notif->created_at->diffForHumans() }}
View
@endforeach
@endif