Rathik's dev blog

Laravel Login url Change via Fortify

A laptop computer sitting on top of a wooden desk
Published on
/1 mins read/---
laravel fortify login url change

Hi Fokls, This is common asking question when you need to change the laravl login url in fortify. Somedays ago i tried many ways to change the fortify login url. So after i got this method below and its tested. Its Working efficiently, you can check this example.

  1. Firstly go to your FortifyServiceProvider and now you have add this below code in boot() method
Fortify::ignoreRoutes();

now its look like

  public function boot()
    {
        Fortify::ignoreRoutes(); // <<< ADDED THIS LINE
 
        // Below is the default configuration that comes with this provider
        // If you changed it, you can keep your changes
        Fortify::createUsersUsing(CreateNewUser::class);
        Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
        Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
        Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
    }
  1. Then copy Fortify's routes definitions to your ./routes/web.php file.

  2. Then go to web.php, need to keep the controllers imports file and you can make changes accordingly.

Thanks For read please comments if its not solved yet

Read More for different Category