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

Notifications

@csrf
@if(session('success'))
{{ session('success') }}
@endif
@forelse($notifications as $notification)
@if(isset($notification->data['appointment_id']))
@else
@endif

{{ $notification->data['message'] ?? 'New notification' }}

@if(isset($notification->data['appointment_id']))

Patient: {{ $notification->data['patient_name'] ?? 'N/A' }}

Type: {{ $notification->data['consultation_type'] ?? 'N/A' }}

@if(isset($notification->data['appointment_date']))

Date: {{ \Carbon\Carbon::parse($notification->data['appointment_date'])->format('M d, Y H:i') }}

@endif
@endif

{{ $notification->created_at->diffForHumans() }}

@if(!$notification->read_at)
@csrf
@endif
@empty

No notifications found.

@endforelse
@if($notifications->hasPages())
{{ $notifications->links() }}
@endif
@endsection