@php $pendingApprovals = collect($approvals)->where('status', 'pending'); @endphp
@if ($pendingApprovals->isNotEmpty())
@if ($pendingApprovals->isNotEmpty()) @foreach ($pendingApprovals as $approval) @endforeach @else @endif
Name Title DTR Date Requested Actions
{{ $approval['name'] }} {{ $approval['title'] }} {{ \Carbon\Carbon::createFromDate($approval['year'], $approval['month'])->format('F Y') }} {{ $approval['date_requested'] }}
Nothing to see here.
@else

No Approvals Yet.

@endif