@once
@endonce
@php
$notificationsReady = auth()->check() && \Illuminate\Support\Facades\Schema::hasTable('notifications');
$headerNotifications = $notificationsReady
? \App\Models\Notification::query()->where('user_id', auth()->id())->latest()->limit(6)->get()
: collect();
$headerUnreadNotifications = $notificationsReady
? \App\Models\Notification::query()->where('user_id', auth()->id())->whereNull('read_at')->count()
: 0;
@endphp
@foreach($headerNotifications as $notification)
{{ __('View all notifications') }}