@php $notifications_count = auth()->user()->unreadNotifications->count(); @endphp @if(!isset($show_all_notifications)) @php $unreadNotifications = auth()->user()->unreadNotifications->take(5); @endphp
@else @php $unreadNotifications = auth()->user()->unreadNotifications->all(); @endphp @endif @if(!isset($show_all_notifications))
@else
@endif
@if(!isset($show_all_notifications))
@endif