@extends('layouts.app')
@section('title', 'Notifications')
@section('content')
Notifications
@if (auth()->user()->notifications()->where('is_read', false)->count() > 0)
@endif
@if ($notifications->count() > 0)
@foreach ($notifications as $notification)
{{ $notification->message }}
{{ $notification->created_at->diffForHumans() }}
@if ($notification->leaveRequest)
View Leave Request →
@endif
@if (!$notification->is_read)
@endif
@endforeach
@if ($notifications->hasPages())
{{ $notifications->links() }}
@endif
@else
@endif
@endsection