Level 1
I had some cache problem.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi guys!
A have an issue with redirect() function with method, after updating to Laravel 5.4.
return redirect()->back()->with(["success" => "The blog post has been saved!"]);
I'm using a simple alert blade template:
@if (session()->has('success'))
<div class="alert alert-success">
<p>{{ session()->get('success') }}</p>
</div>
@endif
My problem is after I successfully save a post the message is always showing. I tried to use the forget method for this key after reading but everytime when I refresh the page on that session the message is still showing.
Here is my debug bar: http://imgur.com/a/YG8sm
That's looks the same after refresh.
Thank you!
Please or to participate in this conversation.