@php $clientNotificationUnread = $client->unreadNotifications()->latest()->take(10)->get(); $clientNotificationRead = $client->readNotifications()->latest()->take(10)->get(); $clientNotificationCount = $client->unreadNotifications()->count(); $notificationIcon = static function (string $type): string { return match (strtolower($type)) { 'success' => 'fa-check-circle', 'danger', 'error' => 'fa-exclamation-circle', 'warning' => 'fa-exclamation-triangle', default => 'fa-info-circle', }; }; @endphp