@extends('layout.admin') @section('template_title') {{ __('Danh sách truyện') }} @endsection @section('content')
@if ($message = session('success'))

{{ $message }}

@endif
@foreach ($articles as $article) @endforeach
# Ảnh Tên truyện Tác giả Thể loại Số chương đã đăng Mô tả Lượt xem Trạng thái hoàn thành Trạng thái duyệt Người tạo Thời gian tạo Thời gian cập nhật Hành động
{{ $article->id }} {{ $article->title }} {{ $article->title }} @foreach($article->authors as $author) {{ $author->name }} @endforeach @foreach($article->genres as $genre) {{ $genre->name }} @endforeach {{ $article->chapters_text }} {{ $article->description }} {{ $article->view_text }} {{ $article->completed_text }} {{ $article->status_text }} {{ $article->user->name }} {{ $article->created_at_text }} {{ $article->updated_at_text }} {{ __('Chi tiết') }} {{ __('Thêm chương') }} {{ __('Sửa') }} @if($currentUser->is_admin)
@csrf @method('PATCH') @if($article->status == \App\Enums\ArticleStatus::PENDING->value) @elseif ($article->status == \App\Enums\ArticleStatus::HIDDEN->value) @endif
@if($article->status == \App\Enums\ArticleStatus::APPROVED->value)
@csrf @method('PATCH')
@endif
@csrf @method('PATCH') @if($article->is_completed == \App\Enums\ArticleCompleteStatus::COMPLETED->value) @elseif ($article->is_completed == \App\Enums\ArticleCompleteStatus::NOT_COMPLETED->value) @endif
@endif
@csrf @method('DELETE')
{!! $articles->links() !!}
@endsection