@php $user = auth()->user(); $query = \App\Models\Notification::where('is_read',0)->where('to',$user->id); $unread_notifications = $query->orderBy('_id','desc')->get()->take(3); $unread_count = $query->count(); @endphp