ldc-legaulois/resources/views/bo/articles/index.blade.php

39 lines
1.4 KiB
PHP

@extends('layouts.bo')
@section('content')
<div class="card">
<div class="card-header">
Liste des articles
<a href="{{route('bo.articles.create')}}" class="btn btn-sm btn-primary float-right">Ajouter</a>
</div>
<div class="card-body">
<table class="table text-center">
<thead class="thead-dark">
<tr>
<th scope="col">Titre</th>
<th scope="col">Catégorie</th>
<th scope="col">Publié ?</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@foreach($a as $article)
<tr>
<th>{{$article->title}}</th>
<td>{{$article->category->name}}</td>
<td>
@if ($article->status === 0)
<i class="fas fa-times cross-red"></i>
@else
<i class="fas fa-check check-green"></i>
@endif
</td>
<td><a href="{{route('bo.articles.edit', $article->id)}}" class="btn btn-sm btn-primary">Éditer</a></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@endsection