{{-- Add New Package --}}
@forelse($packages as $index => $package) {{-- --}} @empty @endforelse
# @if($sortField === 'sort_order') {{ $sortDirection === 'asc' ? '🔼' : '🔽' }} @endif Image Package Name @if($sortField === 'package_name') {{ $sortDirection === 'asc' ? '🔼' : '🔽' }} @endif Description Price @if($sortField === 'price') {{ $sortDirection === 'asc' ? '🔼' : '🔽' }} @endif Stock Expiry Date Actions
{{ $package->sort_order }}{{ $packages->firstItem() + $index }} @if (!empty($package->image)) @if (Str::startsWith($package->image, ['http://', 'https://'])) Package Image @elseif (file_exists(storage_path('app/public/' . $package->image))) 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
No packages found.
{{ $packages->links() }}