?
Current File : /home/sanghavirealty/public_html/resourcesazwer/views/properties/edit.blade.php
@extends('layoutsdashboard.dashboard-design',[
    'webtitle'=> 'Edit Property'
    
    ])

@section('content')

   <div class="section-userdata">
        <div class="container py-2">

            <div class="card shadow mt-4">
        <div class="card-header">
            <h2 class="card-title h4 mb-0">Edit Property: {{ $property->title }}</h3>
        </div>
        <div class="card-body">
            <form action="{{ route('properties.update', $property->id) }}" method="POST">
                @csrf
                @method('PUT')
                <div class="mb-3">
                    <label for="title" class="form-label">Title</label>
                    <input type="text" class="form-control" id="title" name="title" value="{{ $property->title }}" required>
                </div>
                <div class="mb-3">
                    <label for="headline" class="form-label">Headline</label>
                    <input type="text" class="form-control" id="headline" name="headline" value="{{ $property->headline }}" required>
                </div>
                <div class="mb-3">
                    <label for="category" class="form-label">Category</label>
                    <select class="form-select" id="category" name="category" required>
                        <option value="residential" @if($property->category == 'residential') selected @endif>Residential</option>
                        <option value="plots" @if($property->category == 'plots') selected @endif>Plots</option>
                        <option value="commercial" @if($property->category == 'commercial') selected @endif>Commercial</option>
                    </select>
                </div>
                <div class="mb-3">
                    <label for="type" class="form-label">Type</label>
                    <select class="form-select" id="type" name="type" required>
                        <option value="Developed" @if($property->type == 'Developed') selected @endif>Developed</option>
                        <option value="Under Development" @if($property->type == 'Under Development') selected @endif>Under Development</option>
                    </select>
                </div>
                <div class="mb-3">
                    <label for="location" class="form-label">Location</label>
                    <input type="text" class="form-control" id="location" name="location" value="{{ $property->location }}" required>
                </div>
                <div class="mb-3">
                    <label for="price" class="form-label">Price</label>
                    <input type="number" step="0.01" class="form-control" id="price" name="price" value="{{ $property->price }}" required>
                </div>
                <div class="mb-3">
                    <label for="projectstatus" class="form-label">Project Status (%)</label>
                    <input type="number" class="form-control" id="projectstatus" name="projectstatus" min="0" max="100" value="{{ $property->projectstatus }}" required>
                </div>
                <div class="mb-3">
                    <label for="description" class="form-label">Description</label>
                    <textarea class="form-control" id="description" name="description" rows="5" required>{{ $property->description }}</textarea>
                </div>
                <div class="mb-3">
                    <label for="quote" class="form-label">Quote</label>
                    <input type="text" class="form-control" id="quote" name="quote" value="{{ $property->quote }}">
                </div>
                <div class="mb-3">
                    <label for="subtitle" class="form-label">Subtitle</label>
                    <input type="text" class="form-control" id="subtitle" name="subtitle" value="{{ $property->subtitle }}">
                </div>
                @for ($i = 1; $i <= 6; $i++)
                    <div class="mb-3">
                        <label for="highlights{{ $i }}" class="form-label">Highlight {{ $i }}</label>
                        <input type="text" class="form-control" id="highlights{{ $i }}" name="highlights{{ $i }}" value="{{ $property->{'highlights' . $i} }}">
                    </div>
                @endfor
                <div class="mb-3">
                    <label for="video" class="form-label">Video URL</label>
                    <input type="text" class="form-control" id="video" name="video" value="{{ $property->video }}">
                </div>
                <div class="mb-3">
                    <label for="videoembeedlink" class="form-label">Video Embed Link</label>
                    <input type="text" class="form-control" id="videoembeedlink" name="videoembeedlink" value="{{ $property->videoembeedlink }}">
                </div>
                <div class="mb-3">
                    <label for="reranotice" class="form-label">RERA Notice</label>
                    <textarea class="form-control" id="reranotice" name="reranotice" rows="3">{{ $property->reranotice }}</textarea>
                </div>
                <button type="submit" class="btn btn-success">Update Property</button>
                <a href="{{ route('properties.index') }}" class="btn btn-secondary">Cancel</a>
            </form>
        </div>
    </div> </div></div>



@stop