F
Filamentβ€’5mo ago
codeartisan

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:
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 ...
Jump to solution
5 Replies
Dennis Koch
Dennis Kochβ€’5mo ago
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 implementation
codeartisan
codeartisanOPβ€’5mo ago
Yeah 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
Lara Zeus
Lara Zeusβ€’5mo ago
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 forms
Lara Zeus
Lara Zeusβ€’5mo ago
these are laravel basics, so unless its related to my package.... good luck πŸ™‚
codeartisan
codeartisanOPβ€’5mo ago
great last one works fine
Want results from more Discord servers?
Add your server