value, NotificationType::WARNING->value, NotificationType::INFORMATION->value, NotificationType::MESSAGE->value, ], ['danger', 'warning', 'info', 'success'], $type->value ); $msg = $immediatelyRaw ? $msg : htmlspecialchars($msg); return ''; } $type = 'messages.' . $type->value; $session = session(); $messages = $session->get($type, []); $messages[] = $msg; $session->set($type, $messages); return ''; }