List all paddocks, create new paddock.
All paddocks new paddocks are closed.
This commit is contained in:
34
resources/views/paddock/list.blade.php
Normal file
34
resources/views/paddock/list.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@extends('paddock.layout')
|
||||
|
||||
@section('content')
|
||||
|
||||
@if (count($paddocks) > 0)
|
||||
<div>
|
||||
<a href="{{ route('paddocks.create') }}">Ajouter un enclos</a>
|
||||
</div>
|
||||
<br>
|
||||
|
||||
<table class="table table-bordered" id="laravel_crud">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Nom</th>
|
||||
<th>État</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($paddocks as $paddock)
|
||||
<tr>
|
||||
<td>{{ $paddock->id }}</td>
|
||||
<td>{{ $paddock->name }}</td>
|
||||
<td>{{ $paddock->isClosed ? 'Fermé' : 'Ouvert' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
{!! $paddocks->links() !!}
|
||||
@else
|
||||
<div><p>Aucun enclos dans ce parc.</p></div>
|
||||
<div><a href="{{ route('paddocks.create') }}">Ajouter un enclos</a></div>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
Reference in New Issue
Block a user