153 lines
7.8 KiB
PHP
Executable File
153 lines
7.8 KiB
PHP
Executable File
@extends('layout.master')
|
|
|
|
@section('content')
|
|
<div class="container mt-2">
|
|
<div class="row">
|
|
<div class="col-lg-12 margin-tb">
|
|
<div class="pull-left">
|
|
<h2>Edit Project</h2>
|
|
</div>
|
|
<div class="pull-right">
|
|
<a class="btn btn-primary" href="{{ route('projects.index') }}" enctype="multipart/form-data">
|
|
Back</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@if(session('status'))
|
|
<div class="alert alert-success mb-1 mt-1">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
<form action="{{ route('projects.update',$project->id) }}" method="POST" enctype="multipart/form-data">
|
|
@csrf
|
|
@method('PUT')
|
|
<div class="row">
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Region id:</label>
|
|
<select class="form-select mb-2" name="region_id">
|
|
<option>Select region</option>
|
|
@foreach($regions as $region)
|
|
<option value="{{$region->id}}" {{$project->region_id == $region->id ? 'selected' : ''}}>{{$region->id}}</option>
|
|
@endforeach
|
|
</select>
|
|
@error('region_id')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project Apartments:</label>
|
|
<input type="number" name="apartments" class="form-control mb-2" placeholder="Project Apartments" value="{{$project->apartments}}">
|
|
@error('apartments')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project floors:</label>
|
|
<input type="number" name="floors" class="form-control mb-2" placeholder="Project floors" value="{{$project->floors}}">
|
|
@error('floors')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project card image:</label>
|
|
<input type="file" name="card_image" class="form-control mb-2" placeholder="Card image" value="{{public_path() . '/uploads/images/' . $project->card_image}}">
|
|
@error('card_image')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project background image:</label>
|
|
<input type="file" name="background_image" class="form-control mb-2" placeholder="Background image" value="{{public_path() . '/uploads/images/' . $project->background_image}}">
|
|
@error('background_image')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project logo:</label>
|
|
<input type="file" name="logo" class="form-control mb-2" placeholder="Logo" value="{{public_path() . '/uploads/images/' . $project->logo}}">
|
|
@error('logo')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project status:</label>
|
|
<input type="text" name="status" class="form-control mb-2" placeholder="Status" value="{{$project->status}}">
|
|
@error('status')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project 3d tour one:</label>
|
|
<input type="text" name="3d_tour_one" class="form-control mb-2" placeholder="3d tour one" value="{{$project->getAttribute('3d_tour_one')}}">
|
|
@error('3d_tour_one')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project 3d tour two:</label>
|
|
<input type="text" name="3d_tour_two" class="form-control mb-2" placeholder="3d tour two" value="{{$project->getAttribute('3d_tour_two')}}">
|
|
@error('3d_tour_two')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project yard image:</label>
|
|
<input type="file" name="yard_image" class="form-control mb-2" placeholder="Yard image" value="{{public_path() . '/uploads/images/' . $project->yard_image}}">
|
|
@error('yard_image')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project hall image:</label>
|
|
<input type="file" name="hall_image" class="form-control mb-2" placeholder="Hall image" value="{{public_path() . '/uploads/images/' . $project->hall_image}}">
|
|
@error('hall_image')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project location:</label>
|
|
<input type="text" name="location" class="form-control mb-2" placeholder="Location" value="{{$project->location}}">
|
|
@error('location')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-12 col-sm-12 col-md-12">
|
|
<div class="form-group">
|
|
<label class="form-label mb-2">Project slug:</label>
|
|
<input type="text" name="slug" class="form-control mb-2" placeholder="Slug" value="{{$project->slug}}">
|
|
@error('slug')
|
|
<div class="alert alert-danger mt-1 mb-1">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn btn-primary ml-3">Submit</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
@endsection
|