@extends('layouts.panel', ['area' => 'user'])
@section('title', 'پکیجها و ارتقا')
@section('content')
پکیج فعلی شما
{{ $user->package_expires_at ? 'تا '.jd($user->package_expires_at, 'Y/m/d').' ('.$user->package_expires_at->diffForHumans().')' : ($current->is_free ? 'پکیج رایگان' : 'بدون محدودیت زمانی') }}
@if($credit > 0)
اعتبار باقیمانده برای ارتقا: {{ toman($credit) }}
@endif
@foreach($packages as $p)
@php
$isCurrent = $current->id && $current->id === $p->id;
$label = $p->is_free ? null : ($isCurrent ? 'تمدید پکیج' : (!$current->is_free && $p->price > $current->price ? 'ارتقا به این پکیج' : 'خرید پکیج'));
@endphp
{{ $p->name }}
@if($isCurrent || ($p->is_free && $current->is_free))
فعلی@elseif($p->is_featured)
محبوب@endif
{{ $p->description }}
@foreach($p->featuresList() as $f)- {{ $f }}
@endforeach
@if($label)
@endif
@endforeach
@endsection