From 9571c1e3d68c283b44b57e43fb307f5aac6a3fa0 Mon Sep 17 00:00:00 2001 From: Ism1tha Date: Wed, 18 Dec 2024 19:19:03 +0100 Subject: [PATCH] fix: :ambulance: remove success and error messages from session after view render --- app/src/app/Core/View.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/app/Core/View.php b/app/src/app/Core/View.php index 85154cf8..0f6f0a00 100644 --- a/app/src/app/Core/View.php +++ b/app/src/app/Core/View.php @@ -27,5 +27,13 @@ public static function render($options = []) } else { throw new Exception("Layout file not found: {$layout}"); } + + if (Session::has('success')) { + Session::remove('success'); + } + + if (Session::has('error')) { + Session::remove('error'); + } } }