Level 12
Not tested but try
Session()->pull(‘error_msg’)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
if i use the below method when the user clicks browser back button session message comes again
//controller
return \Redirect::back()->with('error_msg', 'No Results Found');
//blade file
@if(session()->has('error_msg') )
<div class="alert alert-danger">{{ session()->get('error_msg') }}</div>
@endif
Please or to participate in this conversation.