@extends('admin.layouts.app') @section('title', $title) @section('content')

Notifications

@if(auth()->user()->unreadNotifications->count()) Mark All as Read @endif @if(auth()->user()->notifications->count()) Delete All @endif
    @forelse(auth()->user()->notifications()->latest()->get() as $notification) @php $service = app('App\Services\NotificationService'); $message = $service->getMessageDetails($notification); @endphp @if($message)
  • read_at)) style="background-color: #CDCDCD" @endif>
    {{ $message['text'] }}
    {{ $notification->created_at->diffForHumans() }}
    @if(!isset($notification->read_at)) @endif
  • @endif @if(!$loop->last)
    @endif @empty
    No notifications available.
    @endforelse
@endsection