Need to change routing system in our project

Laraship QuestionsCategory: ConfigurationNeed to change routing system in our project
SANDEEP AGGARWAL asked 4 years 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 4 years 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 4 years 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 4 years ago

thank you finally i found the solution