@extends('layouts.app') @section('title', 'Notifications') @section('breadcrumb') Home Notifications @endsection @push('styles') @endpush @section('content')
@if($notifications->isEmpty())
No notifications yet
When the system has something for you, it'll show up here and in the bell-icon dropdown.
@else
@foreach($notifications as $n) @php $data = is_array($n->data) ? $n->data : []; $tone = match ($data['icon'] ?? null) { 'check' => 'is-success', 'x' => 'is-danger', default => '' }; $url = $data['url'] ?? '#'; @endphp @if(($data['icon'] ?? null) === 'check') @elseif(($data['icon'] ?? null) === 'x') @else @endif
{{ $data['title'] ?? 'Notification' }} @if(!$n->read_at)@endif
{{ $data['body'] ?? '' }}
{{ $n->created_at->diffForHumans() }} ยท {{ $n->created_at->format('d M Y, h:i A') }}
@endforeach
@if($notifications->hasPages())
{{ $notifications->links() }}
@endif @endif
@endsection