How to redirect to a questionnaire when a user logins orr creates an account
I used @Lara Zeus form builder package to create a questionnaire that requires a user to login and answer then I added basic breeze starter for authentication (login and register) so a user is able to register so. How can I redirect to that questionnaire after a user logins or registers?
Solution:Jump to solution
I think if you use
return redirect()->intended();
it will redirect the user to the last page they visit and it will be the form
...5 Replies
Did some googling, seems like the redirection is the last action in
app/Http/Controllers/Auth/AuthenticatedSessionController
store()
method. You can replace the with your own implementationYeah I see that method very well just wondering how to get the questionnaire url or I just copy the browser url and redirect to that
Solution
I think if you use
return redirect()->intended();
it will redirect the user to the last page they visit and it will be the form
you can redirect back
return back();
you can redirect to the route name form
return redirect()->route('bolt.form.show',['slug' => 'formSlug']);
and you can see all the routes in the file
vendor/lara-zeus/bolt/routes/web.php
and you can add a link like in the headers for all formsthese are laravel basics, so unless its related to my package....
good luck π
great last one works fine