@extends('backend.layouts.app') @section('title', \App\Http\Helpers\MenuHelper::getPageTitle()) @section('content') @include('backend.module._index-reset-button')

All Articles

@can('content-article.create') Create @endcan
@if(!$cat)
Use the Category filter above to view articles under a specific category, then drag & drop to reorder.
@elseif($cat && count($articles) <= 1)
Add at least 2 articles in this category to enable drag & drop reordering.
@endif
@forelse($articles as $article) @php $mainTranslation = $article->translations->firstWhere('article_translation_main', 1) ?? $article->translations->first(); @endphp @empty @endforelse
# Article Slug Title Category Status Sort Actions
@if($cat) @if(count($articles) > 1) @else @endif @else @endif {{ ($articles->currentPage() - 1) * $articles->perPage() + $loop->iteration }} {{ $article->article_code }} {{ $mainTranslation->article_translation_title ?? '-' }} @if($article->translations->count() > 1) {{ $article->translations->count() }} languages @endif {{ $categories[$article->article_category] ?? $article->article_category ?? '-' }} @php $rawStatus = $article->article_status; $statusBadge = [ 'ACTIVE' => 'bg-success-50 text-success-600 dark:bg-success-500/10 dark:text-success-400', 'INACTIVE' => 'bg-error-50 text-error-600 dark:bg-error-500/10 dark:text-error-400', 'ARCHIVE' => 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400', ][$rawStatus] ?? 'bg-gray-100 text-gray-600 dark:bg-gray-800 dark:text-gray-400'; $statusLabel = $rawStatus ? ($statuses[$rawStatus] ?? ucfirst(strtolower($rawStatus))) : '-'; $publishStart = $article->publish_start; $publishEnd = $article->publish_end; $hasWindow = $publishStart || $publishEnd; $isEnded = $publishEnd && now()->gt($publishEnd); $isUpcoming = ! $isEnded && $publishStart && now()->lt($publishStart); $windowTextClass = $isEnded ? 'text-error-600 dark:text-error-500' : ($isUpcoming ? 'text-warning-600 dark:text-warning-400' : 'text-gray-500 dark:text-gray-400'); @endphp {{ $statusLabel }} @if($hasWindow)
START @if($publishStart) {{ $publishStart->format('d/m/Y h:i A') }} @else No start date @endif END @if($publishEnd) {{ $publishEnd->format('d/m/Y h:i A') }} @else No end date @endif
@endif
{{ $article->article_sorting ?? '-' }}
@can('content-article.update') @endcan @can('content-article.delete')
@csrf @method('DELETE')
@endcan

No articles found

Click "Create" to add your first entry.

{{ $articles->appends(request()->query())->links('vendor.pagination.custom') }}
@endsection @push('scripts') @endpush