@extends('layouts.app') @section('content')

Notifications

@if($notifications->where('is_read', false)->count() > 0)
@csrf @method('PATCH')
@endif
@if(session('success'))
{{ session('success') }}
@endif
@if($notifications->count() > 0)
@foreach($notifications as $notification)

{{ $notification->title }}

@if(!$notification->is_read) New @endif

{{ $notification->body }}

{{ $notification->created_at->diffForHumans() }} {{ str_replace('_', ' ', $notification->type) }}
View @if(!$notification->is_read)
@csrf @method('PATCH')
@endif
@csrf @method('DELETE')
@endforeach
{{ $notifications->links() }}
@else

No notifications

You don't have any notifications yet.

@endif
@endsection