| {{ $package->sort_order }} | {{-- {{ $packages->firstItem() + $index }} | --}}
@if (!empty($package->image))
@if (Str::startsWith($package->image, ['http://', 'https://']))
@elseif (file_exists(storage_path('app/public/' . $package->image)))
@else
No Image
@endif
@else
No Image
@endif
|
{{ $package->package_name }} |
{{ Str::limit($package->description, 50) }} |
@php
$balanceIcons = [
'balance' => '💎', // Diamond - ألماس
'gift_balance' => '🌟', // Star - نجمة
'donate' => '4', // رقم 4 أخضر
'silk' => '⚪', // دائرة فضية
];
$icon = $balanceIcons[$package->balance_type] ?? '❓'; // Default icon لو مش معروف
@endphp
{!! number_format($package->price, 2) !!} {!! $icon !!}
|
@php
if ($package->stock == 999) {
$stockLabel = 'Unlimited';
$stockClass = 'badge-primary'; // لون مميز للـ Unlimited
} else {
$stockLabel = $package->stock;
$stockClass = $package->stock > 10 ? 'badge-success'
: ($package->stock > 0 ? 'badge-warning' : 'badge-danger');
}
@endphp
{{ $stockLabel }}
|
{{ $package->expiry_date ? \Carbon\Carbon::parse($package->expiry_date)->format('Y-m-d h:i A') : 'N/A' }} |
Edit
Items
|
@empty