@extends('layouts/contentLayoutMaster') @section('title', 'Settings-Payment') @section('main-page', 'Payment & Shipping') @section('vendor-style') {{-- Page Css files --}} @endsection @section('page-style') {{-- Page Css files --}} @endsection @php // Define label + icons for each row $paymentRows = [ ['label' => 'Aman', 'icons' => ['aman.png']], ['label' => 'Credit/Debit Card', 'icons' => ['Visa.png', 'mastercard.png']], ['label' => 'Paypal', 'icons' => ['Paypal.png']], ['label' => 'Cash on delivery (COD)', 'icons' => ['cash.png']], ]; @endphp @section('content')
{{-- Payment header --}}

Payment

@foreach ($paymentMethods as $paymentMethod)
@csrf
Payment Icon {{ $paymentMethod->name }}
{{-- ensure 0 is sent when unchecked --}} active) data-form="#toggle-payment-form-{{ $paymentMethod->id }}">
@endforeach {{-- remove the shared Save/Discard for payments; each row submits itself --}} {{-- Divider between Payment and Shipping --}}

Shipping

@csrf @method('PUT') {{-- What setting to toggle --}} {{-- Single source of truth submitted to backend --}}
Shipping Enable Shipping at Checkout
{{-- keep checkbox UNNAMED; JS writes hidden value before submit --}}

Design Payment

@csrf @method('PUT') {{-- What setting to toggle --}} {{-- Single source of truth submitted to backend --}}
Enable Payment
{{-- keep checkbox UNNAMED; JS writes hidden value before submit --}}
@endsection @section('vendor-script') {{-- Vendor js files --}} @endsection @section('page-script') {{-- Page js files --}} @endsection