API Location Management

@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@csrf {{-- ================= LOCATION UPDATE ================= --}}
Location Update
Used to calculate monthly payment rate.
{{-- Active + Share --}}
@foreach([1 => 'Active', 0 => 'Deactive'] as $val => $label)
active_status ?? 1) == $val ? 'checked' : '' }}>
@endforeach
@foreach([1 => 'Active', 0 => 'Deactive'] as $val => $label)
share_vehicles ?? 1) == $val ? 'checked' : '' }}>
@endforeach
@foreach([1 => 'Yes', 0 => 'No'] as $val => $label)
show_first_image ?? 1) == $val ? 'checked' : '' }}>
@endforeach
{{-- Contact --}}
@foreach([1 => 'Iframe code with the link', 0 => 'Iframe code without a link'] as $val => $label)
website_link ?? 1) == $val ? 'checked' : '' }}>
@endforeach
{{-- ================= EXTERNAL WEBSITE CODE ================= --}}
External Website Code
@foreach([1 => 'Active', 0 => 'Deactive'] as $val => $label)
external_status ?? 1) == $val ? 'checked' : '' }}>
@endforeach
@if(!empty($location?->api_token)) @else

Save location to generate iframe URL

@endif

{{-- Design --}}
Design
@foreach([ 'bg_color_expand' => 'Background Colour Expand', 'bg_color' => 'Background Colour', 'text_color' => 'Text Colour', 'button_color' => 'Button Colour', 'button_text_color' => 'Button Text Colour' ] as $field => $label)
@endforeach

{{-- Buttons --}}
@foreach([1 => 'Active', 0 => 'Deactive'] as $val => $label)
phone_button ?? 1) == $val ? 'checked' : '' }}>
@endforeach
@foreach([1 => 'Active', 0 => 'Deactive'] as $val => $label)
show_form ?? 1) == $val ? 'checked' : '' }}>
@endforeach

{{-- Locations --}}
Locations
@php $selectedLocations = old('locations', $location->locations ?? []); @endphp @foreach($locations as $loc)
id, $selectedLocations) ? 'checked' : '' }}>
@endforeach
{{-- Brands --}}
Marke
@foreach($brands as $brand) @php $brandKey = Str::slug($brand); $selectedType = old("brands.$brandKey", $savedBrands[$brandKey] ?? 'all'); @endphp
@foreach(['all','new','used','none'] as $type)
@endforeach
@endforeach