L
L
Leshiy666132018-12-14 11:22:14
Laravel
Leshiy66613, 2018-12-14 11:22:14

How to add an anchor to a redirect when registration fails?

On one of the pages, the registration form is located under the canvas of the text, and after submitting the form with an error (if something is wrong, it redirects back), the page is not on the form, but at the beginning of the page. Is it possible to add an anchor to the redirect somehow (given the submit page)? I understand that you can do Ajax, but I wonder where and how you can implement such a redirect

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Filippenko, 2018-12-14
@alexfilus

It is possible to write a parameter in GET or session, and after redirection, checking it, scroll the page.

J
JhaoDa, 2018-12-14
@JhaoDa

Hands.

return redirect()->to(route('auth.login').'#form');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question