@extends('admin.layout') @php use Illuminate\Support\Facades\Storage; @endphp @section('title', 'Gestion des articles') @section('content')

Gestion des articles

+ Nouvel article
Réinitialiser
@forelse($posts as $post) @empty @endforelse
Image Titre Auteur Catégorie Tags Statut Publication Actions
@if($post->featured_image) {{ $post->title }}
@else
@endif
{{ $post->title }} {{ $post->user->name }} {{ $post->category->name ?? '—' }} @if($post->tags->count() > 0)
@foreach($post->tags->take(2) as $tag) {{ $tag->name }} @endforeach
@else @endif
@php $statusLabels = [ 'published' => 'Publié', 'draft' => 'Brouillon', 'archived' => 'Archivé' ]; $statusColors = [ 'published' => ['bg' => 'rgba(0, 200, 83, 0.1)', 'text' => '#00C853', 'border' => 'rgba(0, 200, 83, 0.2)'], 'draft' => ['bg' => 'rgba(251, 191, 36, 0.1)', 'text' => '#f59e0b', 'border' => 'rgba(251, 191, 36, 0.2)'], 'archived' => ['bg' => '#f3f4f6', 'text' => '#6b7280', 'border' => '#e5e7eb'] ]; $color = $statusColors[$post->status] ?? $statusColors['archived']; @endphp {{ $statusLabels[$post->status] ?? $post->status }} @if($post->published_at) {{ $post->published_at->format('d/m/Y') }} @else @endif
@csrf @method('DELETE')
Aucun article trouvé
@if($posts->hasPages())
Lignes {{ $posts->firstItem() }} à {{ $posts->lastItem() }} sur {{ $posts->total() }}
{{ $posts->links() }}
@endif @endsection