@extends('layouts.app') @section('title', 'Notifications') @section('breadcrumb') Notifications @endsection @section('content')
@forelse($notifications as $notification)
@php $data = is_string($notification->data) ? json_decode($notification->data, true) : $notification->data; @endphp
{{ $data['title'] ?? 'Notification' }}
{{ $data['message'] ?? '' }}
{{ $notification->created_at->diffForHumans() }}
@if(!$notification->read_at)
@csrf @method('PATCH')
@endif
@empty
No notifications
You're all caught up!
@endforelse
@if($notifications->hasPages()) @endif @endsection