@extends('layouts.layout') @section('content') {{-- Leaflet CSS --}}

Contact Us Management

Manage and view contact information

{{-- Add Contact Form --}}

Add New Contact

@csrf
@error('address_line1')
{{ $message }}
@enderror
@error('address_line2')
{{ $message }}
@enderror
@error('city')
{{ $message }}
@enderror
@error('state')
{{ $message }}
@enderror
@error('postal_code')
{{ $message }}
@enderror
@error('country')
{{ $message }}
@enderror
{{-- Hotlines --}}
@error('hotline_primary')
{{ $message }}
@enderror
@error('hotline_secondary')
{{ $message }}
@enderror
@error('hotline_third')
{{ $message }}
@enderror
@error('email')
{{ $message }}
@enderror
{{-- ── MAP PICKER (Add Form) ── --}}
@error('latitude')
{{ $message }}
@enderror
@error('longitude')
{{ $message }}
@enderror
@error('map_url')
{{ $message }}
@enderror
{{-- Contact List Table --}}

Contact List

{{ count($contact) }} Contacts
{{-- --}} {{-- @forelse ($contact as $item) @empty @endforelse --}} @forelse ($contact as $item) @php $hotlines = array_filter([ $item['hotline_primary'] ?? null, $item['hotline_secondary'] ?? null, $item['hotline_third'] ?? null, ]); $hotlineCount = max(count($hotlines), 1); @endphp @foreach ($hotlines as $index => $hotline) {{-- ID — only on first row --}} @if ($index === 0) @endif {{-- ADDRESS — only on first row --}} @if ($index === 0) @endif {{-- CITY / COUNTRY — only on first row --}} @if ($index === 0) @endif {{-- HOTLINE NUMBER + VALUE --}} {{-- EMAIL — only on first row --}} @if ($index === 0) @endif {{-- CREATED AT — only on first row --}} @if ($index === 0) @endif {{-- ACTION — only on first row --}} @if ($index === 0) @endif @endforeach @empty @endforelse
ID ADDRESS CITY / COUNTRY PRIMARY HOTLINE EMAIL CREATED AT ACTION
ID ADDRESS CITY / COUNTRY # PRIMARY HOTLINE EMAIL CREATED AT ACTION
{{ $item['id'] }} {{ $item['address_line1'] ?? '' }} @if (!empty($item['address_line2']))
{{ $item['address_line2'] }} @endif
{{ $item['city'] ?? 'N/A' }} @if (!empty($item['country'])) , {{ $item['country'] }} @endif {{ $item['hotline_primary'] ?? 'N/A' }} @if (!empty($item['hotline_secondary'] ?? $item['hotline_third']))
{{ $item['hotline_secondary'] ?? '' }} - {{ $item['hotline_third'] ?? '' }} @endif
{{ $item['email'] ?? 'N/A' }} @if (!empty($item['created_at'])) {{ \Carbon\Carbon::parse($item['created_at'])->format('d M Y') }} @else N/A @endif
No contacts found.
{{ $item['id'] }}
{{ $item['address_line1'] ?? 'N/A' }}
@if (!empty($item['address_line2'])) {{ $item['address_line2'] }} @endif
{{ $item['city'] ?? 'N/A' }} @if (!empty($item['country'])) , {{ $item['country'] }} @endif {{ $index + 1 }} {{ $hotline }} {{ $item['email'] ?? 'N/A' }} @if (!empty($item['created_at'])) {{ \Carbon\Carbon::parse($item['created_at'])->format('d M Y') }} @else N/A @endif
No contacts found.
@include('layouts.footer')
{{-- ==================== TOAST ==================== --}}
@if (session('success')) @endif @if (session('error')) @endif {{-- ==================== EDIT MODAL ==================== --}} {{-- ==================== DELETE MODAL ==================== --}} {{-- Leaflet JS --}} @endsection