@php $isGuest = !auth()->check(); $readonly = $isGuest ? 'readonly' : null; $disabled = $isGuest ? 'disabled' : null; $deviceOptions = $devices ?? []; $existingPurchaseDevices = $purchaseDevices ?? []; @endphp
@if (!empty($existingPurchaseDevices)) @foreach ($existingPurchaseDevices as $idx => $existingDevice) @endforeach @elseif (!empty($deviceOptions)) {{-- Show one empty row with device options if no existing data --}} @else @endif
Product Unit Price/month Qty Cost Action
$
${{ number_format($existingDevice['price'] * $existingDevice['quantity'], 2) }}
@if (!$isGuest) @endif
$
$0.00
@if (!$isGuest) @endif
No devices available
Total Monthly Cost: $0.00
@if (!$isGuest)
@endif