@php $languages = []; $currentLang = null; if (Schema::hasTable('languages')) { $languages = collect((new App\Repositories\LanguageRepository())->getAll()); $currentLangCode = session('app_locale', 'en'); $currentLang = $languages->where('name', $currentLangCode)->first(); } @endphp
@forelse(auth()->user()->unreadNotifications as $notification)
{{ $notification->data['type'] ?? 'Notification' }}
{{$notification->created_at->diffForHumans()}}
{{ $notification->data['message'] ?? '-' }}
@if($notification->data['type'] == 'Complaint') @else @endif
@empty
No notifications
@endforelse
{{-- --}}
{{ __($currentLang->title) }} @if ($languages->count() > 1)
@foreach ($languages as $language) @if ($language->id !== $currentLang->id) {{ __($language->title) }} @endif @endforeach
@endif