Need to change routing system in our project

Need to change routing system in our project

Laraship QuestionsCategory: ConfigurationNeed to change routing system in our project
SANDEEP AGGARWAL asked 2 weeks ago
Hi laraship team,
We integrate our existing Laravel project with your laraship, one I have bought and its work well. When I login page will be redirect to the dashboard page (like: project_url/dashboard). In our project we need to redirect some other pages (like: url/timeline, url/message_group, url/friend request), after successful login. Let me share, any way to change our routing system.
Thanks lot and your support.
1 Answers
laraship Staff answered 2 weeks ago
hello,
you can use the auth_redirect_to filter to setup the redirect URL upon authentication

\Filters::add_filter('auth_redirect_to', [ClassifiedHook::class, 'auth_redirect_to'], 100);

You can register this under your module or theme function.php

forexample

<?php


\Filters::add_filter('auth_redirect_to', function ($redirect_url) {

return url('my-url');

}, 12);

 

SANDEEP AGGARWAL
replied 2 weeks ago

Hi laraship tech team,

Thanks lot and thank you so much for your response,

Last one day research about this code, but i can’t find out where above code will place. Let me share file location to replace or add the above code.

Please help me ………..

Thank you.

 

SANDEEP AGGARWAL
replied 2 weeks ago

thank you finally i found the solution

Happy New Year!

40% DISCOUNT ON OUR ENTIRE STORE
COUPON CODE : Hello2021
GO TO STORE
LIMITED TIME OFFER
close-link
40% Off on all of LARASHIP platforms, plugins, and themes NO EXCLUSIONS
CODE: Hello2021
close-image