@extends('layout.mainlayout') @section('content')
@component('components.breadcrumb') @slot('title') Custom notification @endslot @endcomponent
Create Custom Notification
@if (session('success'))
{{ session('success') }}
@elseif(session('error'))
{{ session('error') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

Send Custom Notification

@csrf
Hold Ctrl (Windows) or Cmd (Mac) to select multiple.
{{-- DataTable for all custom notifications --}}
All Custom Notifications
@foreach($customNotifications as $n) @endforeach
# Title Message Departments URL Created By Created At
{{ $loop->iteration }} {{ $n->title }} {{ $n->message }} @if($n->departments === 'all') All Departments @else @php $deptNames = \App\Models\Department::whereIn('id', explode(',', $n->departments))->pluck('name')->toArray(); @endphp {{ implode(', ', $deptNames) }} @endif @if($n->url) {{ $n->url }} @endif {{ $n->createdBy->name ?? 'N/A' }} {{ $n->created_at->format('d M Y, h:i A') }}
{{-- Optionally add pagination if needed --}} {{-- {{ $customNotifications->links() }} --}}
@endsection @push('scripts') @endpush