@php $editing = $zone->exists; $rows = old('slabs', collect($zone->slabs())->map(fn ($s) => ['up_to_tonnes' => rtrim(rtrim(number_format($s['up_to_kg'] / 1000, 2, '.', ''), '0'), '.'), 'fare' => rtrim(rtrim(number_format($s['fare'], 2, '.', ''), '0'), '.')])->all()); $rows = array_pad(array_values($rows), \App\Modules\Shipping\Http\Controllers\Admin\DeliveryZoneController::SLAB_ROWS, ['up_to_tonnes' => '', 'fare' => '']); @endphp All zones
@csrf @if ($editing) @method('PUT') @endif
Zone
Fares by load weight

The order's total weight (pack weight × quantity) is matched to the first row it fits in. Leave unused rows empty.

@error('slabs')
{{ $message }}
@enderror
@foreach ($rows as $i => $row) @endforeach
Up to (tonnes)Fare (₹)
Display
@if ($editing)
@csrf @method('DELETE')
@endif