Tuesday, February 28, 2017

Laravel 5.3 backend and Vue 2.0 form to create user

I'm having trouble authenticating users via Vue 2.0.

In Vue I have a form in which the user enters all his data and submits it via POST to a Laravel (web route) endpoint.

Then the user is created in the UserController method with the supplied data and I'm stuck at this point as I don't manage to authenticate my user after creation and redirecting him to some route (other page).

User creation goes fine...

Can someone explain me rapidly how it should work? (as I understood that I can't redirect from the controller as the data is POSTed via an ajax call).

What's the "right" way to do this as I'm afraid I'm completely mistaken :)

Thanks in advance for your help.




via Charles Dubant

Advertisement