ldc-legaulois/resources/views/bo/ads/index.blade.php
2021-04-28 13:57:12 +02:00

43 lines
1.6 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Saga publicitaires
<a href="{{route('bo.ads.create')}}" class="btn btn-sm btn-primary float-right">Ajouter</a>
</div>
<div class="card-body">
{{ $a->withQueryString()->links() }}
<table class="table text-center">
<thead class="thead-dark">
<tr>
<th scope="col">Titre</th>
<th scope="col">Date de création</th>
<th scope="col">Publié ?</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach($a as $ad)
<tr>
<th>{{$ad->title}}</th>
<td>{{$ad->created_at->format('d/m/Y à H:i')}}</td>
<td>
<a href="{{route('bo.ads.change-published', $ad)}}" class="btn-link">
@if ($ad->status)
<i class="fas fa-check check-green"></i>
@else
<i class="fas fa-times cross-red"></i>
@endif
</a>
</td>
<td><a href="{{route('bo.ads.edit', ['ad' => $ad->id])}}" class="btn btn-sm btn-primary">Éditer</a></td>
</tr>
@endforeach
</tbody>
</table>
{{ $a->withQueryString()->links() }}
</div>
</div>
@endsection