@extends('layouts.admin') @section('content')
@php $steps = [ 1 => 'Basic Details', 2 => 'Property Details', 3 => 'Location Details', 4 => 'Photos & Videos', ]; $currentStep = request()->route()->getName(); preg_match('/step_(\d+)/', $currentStep, $matches); $activeStep = isset($matches[1]) ? (int) $matches[1] : 1; @endphp
@foreach ($steps as $step => $label)
{{ $step }} {{ $label }} @if ($step < count($steps))
@endif
@endforeach
{{ csrf_field() }}
{{ __('Property Images') }}
{{ __('Property Covered Image') }}
@if ($errors->has('photo')) {{ $errors->first('photo') }} @endif
@php $commonReasons = [ 'Blurry or low-quality image', 'Incorrect or misleading photo', 'Watermarked or copyrighted image', 'Inappropriate images', 'Duplicate images', ]; $selectedReasons = old('reason', $re_message?->reason); // Normalize to array if (!is_array($selectedReasons)) { $selectedReasons = $selectedReasons ? [$selectedReasons] : []; } // Extract any custom reason not in common list $customReason = collect($selectedReasons) ->filter(fn($r) => !in_array($r, $commonReasons)) ->first(); @endphp {{-- Common Reasons as Checkboxes --}}
@foreach ($commonReasons as $reason)
@endforeach
{{-- Optional Custom Reason --}}
@if ($deleted_images->count())
Warning! These images are deleted. You can restore or delete them permanently.
@php $firstImage = $deleted_images->first(); $firstImageId = $firstImage ? $firstImage->id : null; $firstImagePhoto = $firstImage ? $firstImage->photo : ''; $restoreUrl = url('/admin/gallery/' . $firstImageId . '/restore'); $deleteUrl = url( '/admin/gallery/' . $firstImageId . '/force-delete', ); @endphp @if ($firstImageId) @endif @foreach ($deleted_images as $image)
Deleted Image
@csrf
@csrf @method('DELETE')
@endforeach
@endif
Minimum 4 images are mandatory
{{ __('Floor Plans') }}
@if ($floor_plans->isEmpty())
@error('floor_names.*') {{ $message }} @enderror
@error('floor_sizes.*') {{ $message }} @enderror
@error('floor_images.*') {{ $message }} @enderror
@else @foreach ($floor_plans as $key => $f_plan)
@error("floor_names.$key") {{ $message }} @enderror
@error("floor_sizes.$key") {{ $message }} @enderror
photo) required @endif> @if (!$f_plan->photo) @error("floor_images.$key") {{ $message }} @enderror @endif
@endforeach @endif
{{ __('Back') }}   
@endsection @section('scripts') @endsection