@extends('staff.layouts.app') @section('content')

Notice Board

Official school announcements.

@if(isset($isPrincipalOrCoord) && $isPrincipalOrCoord) New @endif Back
@if ($errors->has('from_date'))
{{ $errors->first('from_date') }}
@endif
@forelse($notices as $notice)
{{ $notice->category }} @if(empty($notice->is_read)) New @endif @if($notice->is_pinned) Pinned @endif
{{ \Carbon\Carbon::parse($notice->published_at)->format('d M, Y') }}

{{ $notice->title }}

{{ $notice->content }}

Tap to read full notice @if($notice->attachment) Attachment @endif
{{-- ✅ EDIT & DELETE BUTTONS (Role-based) --}}
@if(isset($isPrincipalOrCoord) && $isPrincipalOrCoord) @endif @if(isset($isPrincipalOnly) && $isPrincipalOnly)
@csrf @method('DELETE')
@endif
@empty

No notices found matching your criteria.

@endforelse
@if($notices->hasPages())
{{ $notices->appends(request()->query())->links() }}
@endif


@endsection