@extends('layouts.user') @section('title') {{ __('contents.editRental') }} @endsection @section('style') @endsection @section('content') @php $village = ""; if(!empty($property->village)){ $village = \App\Models\Village::where('code',$property->village)->first(); } $commune = \App\Models\Commune::where('code',$property->commune)->first(); $district = \App\Models\District::where('code',$property->district)->first(); $province = \App\Models\Province::where('code',$property->province)->first(); $prop_info = json_decode($property->Info); $prop_utilites = json_decode($property->utilities); $prop_others = json_decode($property->others); $prop_variations = json_decode($property->variations); $variationData = $property->variations ? json_decode($property->variations, true) : []; $varitaions = json_decode($type->variations); $info = json_decode($type->info); $utilities = json_decode($type->utilities); $others = json_decode($type->other_terms); @endphp

{{ __('contents.newRental') }}

@csrf

Address & Location


{{ __('contents.overview') }}

@if(!empty($property->gallery)) @php $gallery = json_decode($property->gallery); $imgs = getMediaByType($property->id,'image'); $videos = getMediaByType($property->id,'video'); @endphp @endif

Photo

@php $previewFiles = []; $previewConfig = []; $currentCover = ''; if(isset($property)) { $existingImgs = getMediaByType($property->id, 'image'); $currentCover = $property->cover_image ?? $property->thumbnail ?? ($existingImgs[0] ?? ''); if (!empty($existingImgs)) { foreach ($existingImgs as $img) { $previewFiles[] = asset("uploads/media/$img"); $previewConfig[] = [ 'caption' => $img, 'key' => $img, 'downloadUrl' => asset("uploads/media/$img"), ]; } } } @endphp {{-- 2. HIDDEN INPUTS --}} {{-- This input holds the filename of the selected cover image --}} {{-- 3. FILE INPUT --}} Upload file .jpg, .png {{-- 4. ERROR MESSAGE --}}

* Please select at least 5 images to continue.

{{-- 5. NAVIGATION BUTTONS --}} @if(!empty($variations) || !empty($info) || (isset($aminites) && count($aminites) > 0 && isset($type) && $type->allow_amenities == 'yes') || !empty($utilities) || !empty($others) )
{{-- ADDED ID HERE: btn-next-photo --}}
@else
{{-- ADDED ID HERE TOO --}}
@endif
@if(!empty($varitaions))

{{ __('contents.variationHeading') }}

{{ __('contents.startingFrom') }}

{{$settings->currency_symbol }} {{ $settings->currency_code }}
{{ __('contents.avrPrice') }}
Add Unit
@if(!empty($info) || (count($aminites) > 0 && $type->allow_amenities == 'yes') || !empty($utilities) || !empty($others) )
@else
@endif
@endif @if(!empty($info))

{{ __('contents.Pinfo') }}

@if(in_array("Container Truck Access",$info))
@endif @if(in_array("Rooms",$info))
@endif @if(in_array("Number of Story",$info))
@endif @if(in_array("Bedrooms",$info))
@endif @if(in_array("Bathrooms",$info))
@endif @if(in_array("Living Rooms",$info))
@endif @if(in_array("Kitchen",$info))
@endif @if(in_array("Balcony",$info))
@endif @if(in_array("Furnished",$info))
@endif @if(in_array("Car Parking",$info))
@endif @if(in_array("Motor Parking",$info))
@endif @if(in_array("Buliding Width (m)",$info))
@endif @if(in_array("Buliding Length (m)",$info))
@endif @if(in_array("Buliding Total Area (sqm)",$info))
@endif @if(in_array("Land Width (m)",$info))
@endif @if(in_array("Land Length (m)",$info))
@endif @if(in_array("Land Total Area (sqm)",$info))
@endif @if(in_array("Land Zone",$info))
@endif @if(in_array("Access Road",$info))
@endif @if(in_array("Space Width (m)",$info))
@endif @if(in_array("Space Length (m)",$info))
@endif @if(in_array("Space Total Area (sqm)",$info))
@endif
@if((count($aminites) > 0 && $type->allow_amenities == 'yes') || !empty($utilities) || !empty($others) )
@else
@endif
@endif @if(count($aminites) > 0 && $type->allow_amenities == 'yes' )

Select Amenities

    @php if(!empty($property->amenities)){ $as = json_decode($property->amenities); }else{ $as = []; } @endphp @foreach($aminites as $aminity)