framework
framework copied to clipboard
Redirect back with $error not working
- Themosis Version: 2.0.2
- WordPress Version: 5.4.2
- PHP Version: 7.4.7
Description
After submitting a form I would like to return a response using the redirect()->back() function using the ->with(
Steps to reproduce
After deleting a customer
I would now return using redirect()->back()->with('success', 'Successfully Deleted!'); I am able to redirect back but the success message does not seem to be passed along.
Expected behavior
After returning with a response. an Alert / notification should show stating that the customer is successfully deleted.
Did you check the session? The code below does seem to work for me.
@if (session('success'))
{{ session('success') }}
@endif
I think you could just do back()->with('success', 'Successfully Deleted!'); (without the redirect) btw