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

gianmarx's avatar

Login

i already had a login system on laravel, but now i want to switch to fortify. I installed fortify as written in the guide but I see my old login. How can I show the fortify login?

0 likes
3 replies
rodrigo.pedra's avatar

From Fortify's README:

Introduction

Laravel Fortify is a frontend agnostic authentication backend for Laravel. Fortify powers the registration, authentication, and two-factor authentication features of Laravel Jetstream.

Reference: https://github.com/laravel/fortify/blob/2602b194b62ef893aa9e6aa60a9d7acd5974db35/README.md?plain=1#L18-L20

In other words, Fortify does not provide any screen or UI, it just provides the authentication code infrastructure to be used by other code. And as said in the Introduction above it was built to power Laravel Jetstream.

One tip: if you are going to try to install Jetstream on your app, first be sure to have a backup of your app, if you are already using GIT you should be fine with this.

Laravel jetstream is meant to be installed on a new application. Although it is possible to install it on an existing application, the commands on its install guide are destructive, in the sense they replace any existing code, as its is assuming you would be installing on a new application.

You can install Jetstream on a blank application and then compare with your current one to see what you need to manually port from to other.

gianmarx's avatar

@rodrigo.pedra no the problem is that I have to overwrite the old routes in routes/web.php

...
Auth::routes();
...

with those of fortify, but I have no idea how to do it

rodrigo.pedra's avatar

@gianmarx Fortify will auto register its routes, unless you manually tell it not to:

https://github.com/laravel/fortify/blob/2602b194b62ef893aa9e6aa60a9d7acd5974db35/src/FortifyServiceProvider.php#L123-L139

Also, from Fortify's docs:

Introduction

Laravel Fortify is a frontend agnostic authentication backend implementation for Laravel. Fortify registers the routes and controllers needed to implement all of Laravel's authentication features, including login, registration, password reset, email verification, and more. After installing Fortify, you may run the route:list Artisan command to see the routes that Fortify has registered.

Reference: https://laravel.com/docs/9.x/fortify

Have you already read the docs?

As suggested in Fortify's docs introduction, try running php artisan route:list and see which routes Fortify already registered on your app.

Please or to participate in this conversation.