2020-07-23 12:26:10 +02:00
|
|
|
@extends('layouts.app')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
<div class="container">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="col-md-8">
|
|
|
|
<div class="card">
|
|
|
|
<div class="card-header">{{ __('Dashboard') }}</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
@if (session('status'))
|
|
|
|
<div class="alert alert-success" role="alert">
|
|
|
|
{{ session('status') }}
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<div class="row">
|
2020-07-23 17:21:26 +02:00
|
|
|
<div class="col-sm-12 mt-4">
|
|
|
|
<form>
|
|
|
|
<label for="price_min">Min prix:</label><input type="number" name="filter[price_min]" id="price_min">
|
|
|
|
<label for="price_max">Max prix:</label><input type="number" name="filter[price_max]" id="price_max">
|
|
|
|
<button class="btn btn-secondary" type="submit">Rechercher</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-07-23 12:26:10 +02:00
|
|
|
@if(count($homes) > 0)
|
|
|
|
@foreach($homes as $home)
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<div class="card">
|
2020-07-23 15:33:48 +02:00
|
|
|
<img class="card-img-top" src="{{ asset($home->pictures[0]) }}">
|
2020-07-23 12:26:10 +02:00
|
|
|
<div class="card-body">
|
|
|
|
<h5 class="card-title">{{ $home->title }}</h5>
|
|
|
|
<p class="card-text">{{ $home->excerpt() }}</p>
|
|
|
|
<a href="{{ route('home.show', ['id' => $home->id]) }}" class="btn btn-primary">Voir la maison</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endforeach
|
2020-07-23 17:21:26 +02:00
|
|
|
<div class="col-sm-12 mt-4">
|
|
|
|
{{ $homes->links() }}
|
|
|
|
</div>
|
2020-07-23 12:26:10 +02:00
|
|
|
@else
|
|
|
|
Aucune maison enregistrée :(
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@endsection
|