@php use App\Models\Shipping\ShippingMethod; @endphp @php /** @var ShippingMethod $shippingMethod */ @endphp

{{ $shippingMethod->title }} tariffs

This section allows you to manage the tariffs for {{ $shippingMethod->title }}. You can change prices, enable or disable countries for delivery, and set the status to "inactive" for countries you want to exclude from delivery. Please make the necessary changes below:

@php $boxes = $shippingMethod->shippingBoxes->groupBy(['pivot.shipping_box_id', 'pivot.zone', 'pivot.country_id']); @endphp @foreach($boxes as $boxID => $box) @foreach($box as $zoneID => $boxZones) @foreach($boxZones->first() as $boxCountries) @endforeach @foreach($boxZones as $countryID => $boxCountries) @foreach($boxCountries as $key => $tariff) @endforeach @endforeach @endforeach
Box: {{ $shippingBoxes->where('id', $boxID)->first()->label }}
Zone: {{ $zoneID }}
Country {{ $boxCountries->pivot->weight_from }} - {{ $boxCountries->pivot->weight_to }} (kg)
{{ $countries->where('id', $countryID)->first()->title }}
pivot->id . '.is_active', $tariff->pivot->is_active) ? 'checked' : '' }} >
@endforeach
@push('script') @endpush