@if($categories->isEmpty())

No Categories Record to Show

@else

Top 3 Categories

This Rank is not confirm it changes accordingly
with respect to points.

@php $dep = $categories->firstWhere('rank', '2'); @endphp
2
{{$dep->category ?? 'N/A'}}
{{$dep->earned_points ?? 'N/A'}} pts
{{$dep->name ?? 'N/A'}}
@if(isset($prizes) && $prizes->has(2)) @php $prize = $prizes[2]->first(); @endphp
{{$prize->title}}
@if($prize->prize_amount)
{{$prize->currency}} {{number_format($prize->prize_amount, 2)}}
@endif @if($prize->description)
{{$prize->description}}
@endif
@else
Prize Not Mentioned
@endif
@php $dep = $categories->firstWhere('rank', '1'); @endphp
1
{{$dep->category ?? 'N/A'}}
{{$dep->earned_points ?? 'N/A'}} pts
{{$dep->name ?? 'N/A'}}
@if(isset($prizes) && $prizes->has(1)) @php $prize = $prizes[1]->first(); @endphp
{{$prize->title}}
@if($prize->prize_amount)
{{$prize->currency}} {{number_format($prize->prize_amount, 2)}}
@endif @if($prize->description)
{{$prize->description}}
@endif
@else
Prize Not Mentioned
@endif
@php $dep = $categories->firstWhere('rank', '3'); @endphp
3
{{$dep->category ?? 'N/A'}}
{{$dep->earned_points ?? 'N/A'}} pts
{{$dep->name ?? 'N/A'}}
@if(isset($prizes) && $prizes->has(3)) @php $prize = $prizes[3]->first(); @endphp
{{$prize->title}}
@if($prize->prize_amount)
{{$prize->currency}} {{number_format($prize->prize_amount, 2)}}
@endif @if($prize->description)
{{$prize->description}}
@endif
@else
Prize Not Mentioned
@endif
@foreach($categories as $dep) @endforeach
Rank Category Department Points Earn
{{$dep->rank}}
{{$dep->category}} {{$dep->name}} {{$dep->earned_points}} pts
@endif