Billing Cycle

@foreach($data as $key => $billing) @php // Check if the subscription is still valid $endDate = Carbon\Carbon::parse($billing->hotel->validity); $currentDate = Carbon\Carbon::now(); $daysLeft = round($currentDate->diffInDays($endDate, false)); @endphp @endforeach
# Hotel Amount Start Date End date Expiration Joined
{{$key +1}} @if(auth()->user()->userGroup && auth()->user()->hasPermission('create billing')) {{$billing->hotel->name}} @else {{$billing->hotel->name}} @endif ₦ {{number_format($billing->amount)}} {{ date('Y-m-d', strtotime($billing->start)) }} {{ date('Y-m-d', strtotime($billing->end)) }} @if($daysLeft < 20) {{$daysLeft}} days @else {{$daysLeft}} days @endif {{$billing->hotel->created_at}}
# Hotel Amount Start Date End date Expiration Joined