mrkarma4ya
1 month ago
242
3
Laravel

How to redirect to an anchor when using back() ?

Posted 1 month ago by mrkarma4ya

I have a page where if there is an error on form submission, it redirects to the same page using

return back()->with('message', 'Some Error');

However, the error message is at the bottom of the form, so I want it to auto scroll to the div with #message. How do I pass #message on back()?

Please sign in or create an account to participate in this conversation.