@extends('layouts.admin') @section('title', ($method === 'POST' ? 'Create' : 'Edit').' Property') @section('content') @php $adminExistingImagePayload = []; $adminInitialBannerSlot = 1; if ($method !== 'POST') { foreach (array_values(array_filter( (array) ($property->images ?? []), static fn ($p) => is_string($p) && $p !== '' && ! str_contains($p, '..') )) as $path) { $adminExistingImagePayload[] = [ 'path' => $path, 'url' => \Illuminate\Support\Facades\Storage::disk('public')->url($path), ]; } $adminPathsOnly = array_column($adminExistingImagePayload, 'path'); $adminBannerPath = (string) ($property->banner_image ?? ''); if ($adminBannerPath !== '' && ($adminBannerIdx = array_search($adminBannerPath, $adminPathsOnly, true)) !== false) { $adminInitialBannerSlot = $adminBannerIdx + 1; } } @endphp

{{ $method === 'POST' ? 'Create Property' : 'Edit Property' }}

Complete all steps to publish property data

@csrf @if($method !== 'POST') @method($method) @endif @if($method !== 'POST') @endif @if ($errors->any())
    @foreach ($errors->all() as $message)
  • {{ $message }}
  • @endforeach
@endif
Form Steps
Basic + Address
Property Details
@php $residentialTypes = ['apartment' => 'Apartment', 'independent_house' => 'Independent House', 'duplex' => 'Duplex', 'independent_floor' => 'Independent Floor', 'villa' => 'Villa', 'penthouse' => 'Penthouse', 'studio' => 'Studio', 'farm_house' => 'Farm House', 'paying_guest' => 'Paying Guest', 'guest_house' => 'Guest House']; $commercialTypes = ['office' => 'Office', 'retail_shop' => 'Retail Shop', 'showroom' => 'Showroom', 'warehouse' => 'Warehouse', 'plot' => 'Plot', 'other' => 'Other']; $residentialTypeIcons = ['apartment' => 'bi-building', 'independent_house' => 'bi-house-door', 'duplex' => 'bi-buildings', 'independent_floor' => 'bi-house', 'villa' => 'bi-house-heart', 'penthouse' => 'bi-house-check', 'studio' => 'bi-door-open', 'farm_house' => 'bi-tree', 'paying_guest' => 'bi-people', 'guest_house' => 'bi-house-up']; $selectedType = old('property_type', $property->meta['property_type'] ?? 'apartment'); $selectedCategory = old('property_category', $property->meta['property_category'] ?? (array_key_exists($selectedType, $commercialTypes) ? 'commercial' : 'residential')); $selectedPurpose = old('listing_purpose', $property->meta['listing_purpose'] ?? 'sell'); @endphp
@error('listing_purpose')
{{ $message }}
@enderror
@foreach($residentialTypes as $type => $label)
@endforeach
@foreach($commercialTypes as $type => $label)
@endforeach
@error('area_sqft')
{{ $message }}
@enderror
Price + Status
is_featured))>
Description
Photos
@if($method !== 'POST')
@endif

Up to 8 images in total — keep current shots, remove any you do not want, and add more below. Saves compress new uploads on the server (about 100 KB each).

Loading gallery…

Back to list
@endsection