ldc-doux/resources/views/back/sliders/index.blade.php
2021-12-17 17:27:25 +01:00

39 lines
No EOL
1.5 KiB
PHP

@extends('layouts.backend')
@section('content')
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
<h1 class="h2">{{ __('Sliders') }} <small class="text-muted">{{ __('Liste') }}</small></h1>
@if ($errors->any())
@foreach($errors->all() as $error)
<span class="float-center text-danger">{{ $error }}</span>
@endforeach
@endif
<a href="{{route('bo.sliders.create')}}" class="btn btn-primary float-right">{{ __('Créer un slider') }}</a>
</div>
<table class="table">
<thead>
<th scope="col">{{ __('Label') }}</th>
<th scope="col">{{ __('Titre de la page') }}</th>
<th scope="col">{{ __('Publié') }}</th>
<th></th>
</thead>
<tbody>
@foreach ($sliders as $slider)
<tr>
<td>{{$slider->label}}</td>
<td>{{$slider->commentaire}}</td>
<td>{{$slider->published ? 'Oui' : 'Non'}}</td>
<td class="text-center">
<a href="{{route('bo.sliders.edit', $slider->id)}}" class="btn btn-sm btn-primary">{{ __('Éditer') }}</a>
<form action="{{route('bo.sliders.destroy', $slider->id)}}" method="POST" class="d-inline">
@method('DELETE')
@csrf
<input type="submit" class="btn btn-sm btn-danger" value="Supprimer" onclick="return confirm('Êtes-vous sûr(e) ?')">
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
@endsection