@extends('layouts.admin') @section('title', 'News') @section('breadcrumbs') @endsection @section('header-actions') @can('create', \App\Models\NewsArticle::class) New article @endcan @endsection @section('content') @php $f = fn ($key) => $filter->get($key); $advancedOpen = collect(['subcategory_id', 'author_id', 'featured', 'breaking', 'published_from', 'published_to', 'created_from', 'created_to', 'trashed']) ->contains(fn ($k) => $filter->has($k)); $trashView = $f('trashed') === 'only'; @endphp {{-- Filters --}}
{{-- Listing --}}
@if ($canBulk)
@csrf @foreach ($filter->toArray() as $key => $value) @endforeach
0 selected
@endif
@if ($canBulk) @endif @forelse ($articles as $article) @if ($canBulk) @endif @empty @endforelse
ID Title Country Category Author Status Feat. Break. Published Created Actions
#{{ $article->id }} @if ($article->featuredImage) @else
@endif
{{ $article->title }}
/{{ $article->slug }}
{{ $article->country?->name }} {{ $article->category?->name }} @if ($article->subcategory)
{{ $article->subcategory->name }}
@endif
{{ $article->author?->name ?? '—' }} {{ $article->status->label() }} @if ($article->trashed())Deleted@endif @if ($article->scheduled_at && $article->status === \App\Enums\ArticleStatus::Scheduled)
{{ $article->scheduled_at->format('d M Y H:i') }}
@endif
@if ($article->is_featured)@endif @if ($article->is_breaking)@endif {{ $article->published_at?->format('d M Y H:i') ?? '—' }} {{ $article->created_at?->format('d M Y H:i') }} @include('admin.news.partials.actions', ['article' => $article])
No articles match these filters.
@endsection @php($lookupData = ['categories' => $categoryTree]) @push('page-scripts') @endpush