Skip to content

Commit

Permalink
fix: 🚑 remove success and error messages from session after view render
Browse files Browse the repository at this point in the history
  • Loading branch information
Ism1tha committed Dec 18, 2024
1 parent 85c0e39 commit 9571c1e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/src/app/Core/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Check warning on line 32 in app/src/app/Core/View.php

View check run for this annotation

Codecov / codecov/patch

app/src/app/Core/View.php#L31-L32

Added lines #L31 - L32 were not covered by tests
}

if (Session::has('error')) {
Session::remove('error');

Check warning on line 36 in app/src/app/Core/View.php

View check run for this annotation

Codecov / codecov/patch

app/src/app/Core/View.php#L35-L36

Added lines #L35 - L36 were not covered by tests
}
}
}

0 comments on commit 9571c1e

Please sign in to comment.