Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gerrardarya's avatar

Laravel 8 Jetstream Login Route

Hi Guys,

Is there a way to change the jetstream route, i want to change jetstream /login to admin/login i change like this

Route::get('/admin/login', function() { return view('auth.login'); }); (livewire login page)

they force the route into /login

0 likes
7 replies
MichielElswood's avatar

Don't want to be late to the party, but for future reference!

Ignore Neeraj1006 answer (sorry my friend.)

Just go to: config/fortify.php and add

    /*
    |--------------------------------------------------------------------------
    | Path
    |--------------------------------------------------------------------------
    |
    | Change the prefix path for the admin routes.
    |
    */
    'path' => 'admin', // change admin to your preferred route.

Note: I added the comment myself.

Laravel 8.1 +

    /*
    |--------------------------------------------------------------------------
    | Path
    |--------------------------------------------------------------------------
    |
    | Change the prefix path for the admin routes.
    |
    */
    'prefix' => 'admin', // change admin to your preferred route.

4 likes
laracoft's avatar

Answering my own question, it's found in FortifyServiceProvider.php::configureRoutes()

MichielElswood's avatar

Minor update. Latest Laravel changed 'path' to 'prefix'. Will update the code for future reference. :-D

bytech's avatar

Thanks for the help. That does indeed place login and register at a customised path. However, the prefix is not added for the dashboard route.

Modifying dashboard route in web .php works, but the auto redirect after login still goes to dashboard in root. Where is the correct place to move the dashboard to a prefixed path equal to login and register? Modifying web .php and then the redirect elsewhere feels hacky.

gizmojo's avatar

Other answers are outdated now you need to edit 'home' in config/fortiy.php

'home' => RouteServiceProvider::HOME,
1 like

Please or to participate in this conversation.