guyal's avatar
Level 1

Laravel Nova Redirect to a custom path after login

I need to redirect user after login to a different place according to its role.

The logic is simple. I tried to put it in redirectPath() function in Nova LoginController.php, but I have a very wired behavior - sometimes after login I reach the right place, sometimes Nova redirects me to panel.

Any idea?

0 likes
6 replies
dalay's avatar

@GUYAL - Hi! Is it to be done at the source? /vendor/laravel/nova/...

Please, explain to me a little

guyal's avatar
Level 1

@dalay , I wrote a detailed explanation in stackoverflow, follow the link in my previos answer!

dalay's avatar

@GUYAL - Sorry ), but i'm newbie! How can I do this without going to the source?

metasyncSite's avatar
    Nova::initialPath('/resources/global-user-resources');

\App\Providers\NovaServiceProvider

public function boot(): void
{
    parent::boot();

    Nova::initialPath('/resources/global-user-resources');
}

Please or to participate in this conversation.