@extends('layouts.admin') @section('title', '站內通知') @section('content')

站內通知

@if(auth()->user()->unreadNotifications->isNotEmpty())
@csrf
@endif
@forelse($notifications as $notification) @php $data = $notification->data; $levelClass = match ($data['level'] ?? 'info') { 'warning' => 'text-warning', 'danger' => 'text-danger', default => 'text-primary', }; @endphp
{{ $data['title'] }} @if($notification->unread()) 新 @endif
{{ $data['body'] }}
{{ $notification->created_at->format('Y-m-d H:i') }}
@if(! empty($data['url'])) 查看 @endif @if($notification->unread())
@csrf
@endif
@empty
目前沒有任何通知
@endforelse
{{ $notifications->links() }} @endsection