Delete paddocks

This commit is contained in:
2020-04-17 09:13:58 +02:00
parent cf6d0ab467
commit 19e1123ef5
2 changed files with 12 additions and 1 deletions

View File

@@ -14,6 +14,7 @@
<th>Id</th>
<th>Nom</th>
<th>État</th>
<th>Actions</th>
</thead>
<tbody>
@foreach($paddocks as $paddock)
@@ -21,6 +22,13 @@
<td>{{ $paddock->id }}</td>
<td>{{ $paddock->name }}</td>
<td>{{ $paddock->isClosed ? 'Fermé' : 'Ouvert' }}</td>
<td>
<form action="{{ route('paddocks.destroy', $paddock->id)}}" method="post">
{{ csrf_field() }}
@method('DELETE')
<button type="submit">Supprimer</button>
</form>
</td>
</tr>
@endforeach
</tbody>