@extends('admin.layouts.app') @section('title', __('admin.announcements.title')) @section('content') @if($errors->any())
@endif
@if(($announcements ?? collect())->isEmpty())
{{ __('admin.announcements.no_announcements_posted') }}
@else @foreach($announcements as $ann) @endforeach
{{ __('admin.announcements.title_column') }}{{ __('common.table.date') }}{{ __('admin.announcements.published') }}{{ __('common.table.actions') }}
{{ $ann->title }} {{ $ann->date?->format(date_fmt()) ?? $ann->created_at->format(date_fmt()) }} {{ $ann->published ? __('admin.announcements.status_published') : __('admin.announcements.status_draft') }}
@csrf @method('DELETE')
@if(method_exists($announcements, 'links'))
{{ $announcements->links() }}
@endif @endif
{{-- The categories already in use, offered while typing one. --}} @foreach($categories ?? [] as $category)
@csrf
@foreach($announcements ?? [] as $ann)
@csrf @method('PUT')
@endforeach @endsection