{{-- @php
$menu = \App\Models\Menu::where('location',"NAVBAR")->with(['links'=>function($q){$q->orderBy('order','ASC');}])->first();
@endphp --}}
{{-- @if($menu !=null)
@foreach($menu->links as $link)
@endforeach
@endif --}}
@guest
@else
@if(auth()->check())
@php
if(session('seen_notifications')==null)
session(['seen_notifications'=>0]);
$notifications=auth()->user()->notifications()->orderBy('created_at','DESC')->limit(50)->get();
$unreadNotifications=auth()->user()->unreadNotifications()->count();
@endphp
@endif
@endguest