@extends('admin.layouts.app') @section('title', 'Edit Property') @section('breadcrumb')
  • Properties
  • Edit
  • @endsection @section('heading', 'Edit Property') @section('subheading', 'Update property listing details.') @section('content') @if ($errors->any())
    @endif
    @csrf @method('PUT') {{-- Section 1: Basic Information --}}

    Basic Information

    Leave blank to auto-generate from title

    {{-- Section 2: Pricing & Area --}}

    Pricing & Area

    {{-- Section 3: Property Details --}}

    Property Details

    {{-- Section 4: Location --}}

    Location

    {{-- Section 5: Media --}} {{-- Section 5: Media --}}

    Media

    {{-- Featured Image --}}
    @php $featuredImg = $property->images->where('is_featured', true)->first(); @endphp @if($featuredImg) @endif
    {{-- Gallery Images --}}
    @php $galleryImgs = $property->images->where('is_featured', false); @endphp @if($galleryImgs->isNotEmpty()) @endif {{-- Upload more --}}
    {{-- Section 6: Amenities --}}

    Amenities

    @php $selectedAmenityIds = old('amenity_ids', $property->amenities->pluck('id')->toArray()); @endphp @foreach ($amenities as $amenity) @endforeach
    {{-- Section 7: Agent & Ownership --}}

    Agent & Ownership

    {{-- Section 8: SEO --}}

    SEO

    {{-- Form Actions --}}
    Cancel
    {{-- ============================================================ --}} {{-- END OF MAIN FORM --}} {{-- ============================================================ --}} {{-- ============================================================ --}} {{-- INDEPENDENT SUB-FORMS (outside main form — no nesting!) --}} {{-- ============================================================ --}} {{-- Section 7b: Floor Plans --}}

    Floor Plans

    Add floor plan images for this property. They will appear on the property detail page.

    @csrf
    @if($property->floorPlans->isNotEmpty()) @foreach($property->floorPlans as $fp) @endforeach
    Title Preview Action
    {{ $fp->title ?: '—' }} @if(str_starts_with($fp->image_path ?? '', 'http')) @else @endif
    @csrf @method('DELETE')
    @endif
    {{-- Section 7c: File Attachments --}}

    File Attachments

    Add documents (PDF, etc.) for this property. They will appear on the property detail page.

    @csrf
    @if($property->attachments->isNotEmpty()) @foreach($property->attachments as $att) @endforeach
    Title File Action
    {{ $att->title ?: $att->file_name }} {{ $att->file_name }}
    @csrf @method('DELETE')
    @endif
    {{-- Section 7d: What's Nearby --}}

    What's Nearby?

    Add nearby points of interest (schools, metro, etc.) for this property.

    @csrf
    @if($property->nearby->isNotEmpty()) @foreach($property->nearby as $n) @endforeach
    Name Type Distance Action
    {{ $n->name }} {{ $n->type ?: '—' }} {{ $n->distance ? $n->distance . ' km' : '—' }}
    @csrf @method('DELETE')
    @endif
    @endsection @section('scripts') @endsection