@php $flash = $flashMessage ?? session('flashMessage'); @endphp @if(!empty($flash)) @php $type = is_array($flash) ? ($flash['type'] ?? 'info') : 'info'; $message = is_array($flash) ? ($flash['message'] ?? '') : $flash; $class = $type === 'success' ? 'alert-success' : ($type === 'error' ? 'alert-error' : 'alert-info'); @endphp