Need to change routing system in our project

Laraship QuestionsCategory: ConfigurationNeed to change routing system in our project
SANDEEP AGGARWAL asked 3 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 3 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);