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

37 lines
No EOL
1.4 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">{{ __('Questions / Réponses') }} <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.texts.create')}}" class="btn btn-primary float-right">{{ __('Créer une Question / Réponse') }}</a>
</div>
<table class="table">
<thead>
<th class="wdt25" scope="col">{{ __('Question') }}</th>
<th scope="col">{{ __('Réponse') }}</th>
<th class="wdt11"></th>
</thead>
<tbody>
@foreach ($texts as $text)
<tr>
<td>{{$text->title}}</td>
<td>{{$text->text}}</td>
<td class="text-center">
<a href="{{route('bo.texts.edit', $text->id)}}" class="btn btn-sm btn-primary">{{ __('Éditer') }}</a>
<form action="{{route('bo.texts.destroy', $text->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