@if(isset($appliedIds) && in_array($scholarship->id, $appliedIds))
Applied
@elseif(isset($wishToApplyIds) && in_array($scholarship->id, $wishToApplyIds))
Wish to Apply
@endif
@if(isset($profile) && $profile && $profile->completed && isset($scholarship->match_score) && $scholarship->match_score !== null)
{{ $scholarship->match_score }}% Match
@endif
@if($scholarship->university || $scholarship->country)
@endif
@if($scholarship->degree_level || $scholarship->funding_type)
@if($scholarship->degree_level)
{{ ucfirst($scholarship->degree_level) }}
@endif
@if($scholarship->funding_type)
{{ str_replace('_', ' ', ucfirst($scholarship->funding_type)) }}
@endif
@endif
{{ Str::limit(strip_tags($scholarship->description ?? ''), 130) }}
@if($scholarship->deadline)
@php
$deadline = \Carbon\Carbon::parse($scholarship->deadline);
$daysLeft = now()->diffInDays($deadline, false);
$isPast = $daysLeft < 0;
@endphp
Deadline: {{ $deadline->format('M d, Y') }}
@if($daysLeft >= 0)
{{ $daysLeft == 0 ? 'Today!' : ($daysLeft . ' days left') }}
@else
{{ abs($daysLeft) }} days overdue
@endif
@endif