@php $locale = app()->getLocale(); $title = data_get($notification->data, 'title_' . $locale) ?? data_get($notification->data, 'title', trans('system.notifications.notification')); $message = data_get($notification->data, 'message_' . $locale) ?? data_get($notification->data, 'message'); $url = data_get($notification->data, 'url'); $type = (string) data_get($notification->data, 'type', $notification->type); $icon = match (true) { str_contains($type, 'booking') => 'bi-calendar-check', str_contains($type, 'offer') => 'bi-tags', str_contains($type, 'contact') => 'bi-envelope', str_contains($type, 'review') => 'bi-star', default => 'bi-bell', }; @endphp
{{ $title }} @if ($message) {{ $message }} @endif