{{-- resources/views/notifications/index.blade.php --}} @extends('layouts.adminmaster') @section('title', 'My Notifications') @section('content')

My Notifications

@php $user = auth()->user(); // Block notifications if admin/owner has no package $shouldHide = in_array($user->user_type, ['owner','admin']) && !$user->package_id; $notifications = $shouldHide ? collect() : $user->notifications; @endphp @forelse($notifications as $notif)
{{ $notif->data['title'] ?? 'Notification' }}
{{ $notif->data['message'] ?? '' }}
{{ $notif->created_at->diffForHumans() }}
@if(!$notif->read_at)
@csrf @method('PATCH')
@endif
@empty
No notifications yet.
@endforelse
@endsection