> ## Documentation Index
> Fetch the complete documentation index at: https://kawax.biz/llms.txt
> Use this file to discover all available pages before exploring further.

# Migration guide from laravel/ui to Fortify

> For existing projects using the laravel/ui auth scaffold: a walkthrough of migrating just the authentication backend to Fortify.

## Why migrate away from `laravel/ui`?

`laravel/ui` still works on Laravel 13. The latest `laravel/ui` release includes Laravel 13 compatibility.

That said, the current official starter kits are Fortify-based. Continuing to run on `laravel/ui` gradually drifts you away from the official direction.
If you want to keep your existing Bootstrap + Blade setup while improving future maintainability, migrating just the authentication backend to Fortify is a good option.

## The big picture of the migration

This migration replaces **only the authentication backend**. No large-scale UI overhaul is needed.

* Fortify provides authentication routes and processing
* Keep your existing Bootstrap + Blade templates
* Adjust form `action`s and input names only where necessary

<Info>
  Fortify is a headless authentication backend. Because Fortify itself provides no UI, your existing Blade views can be used as-is.
</Info>

## Installing Fortify

<Steps>
  <Step title="Add the Fortify package">
    ```bash theme={null}
    composer require laravel/fortify
    ```
  </Step>

  <Step title="Publish Fortify's resources">
    ```bash theme={null}
    php artisan fortify:install
    ```
  </Step>

  <Step title="Run migrations">
    ```bash theme={null}
    php artisan migrate
    ```
  </Step>

  <Step title="Remove the auth routes added by `laravel/ui`">
    Remove `Auth::routes();` or `Auth::routes([...])` from `routes/web.php`. Because Fortify provides routes like `/login`, `/register`, and `/forgot-password`, you need to avoid duplicates.
  </Step>
</Steps>

## Configuring `FortifyServiceProvider`

Wire up the views in the `app/Providers/FortifyServiceProvider.php` published by `php artisan fortify:install`.
If you plan to reuse `resources/views/auth` as-is, this configuration is the key to migrating.

```php theme={null}
use Laravel\Fortify\Fortify;

public function boot(): void
{
    Fortify::viewPrefix('auth.');
    Fortify::requestPasswordResetLinkView('auth.passwords.email');
    Fortify::resetPasswordView('auth.passwords.reset');
    Fortify::confirmPasswordView('auth.passwords.confirm');
    Fortify::verifyEmailView('auth.verify');
}
```

## Minimal changes to Blade templates

After the migration, verify the following in your existing Blade views:

* That form `action`s point to Fortify's endpoints (e.g. `/login`, `/register`, `/forgot-password`). Most use named routes like `route('login')` and `route('register')`, so there should be little to change. One exception is `route('verification.resend')`, which in Fortify is `route('verification.send')` and needs updating.

Two edits are needed in `auth/passwords/reset.blade.php`:

```
<input type="hidden" name="token" value="{{ $token }}">
```

↓

```
<input type="hidden" name="token" value="{{ $request->route('token') }}">
```

```
{{ $email ?? old('email') }}
```

↓

```
{{ old('email', $request->email) }}
```

## Disable features you don't need

Features that didn't exist in `laravel/ui` won't work out of the box, so disable them in `config/fortify.php`. You can enable them later by adding the corresponding view files.

```php theme={null}
    'features' => [
        Features::registration(),
        Features::resetPasswords(),
        // Features::emailVerification(),
        // Features::updateProfileInformation(),
        // Features::updatePasswords(),
        // Features::twoFactorAuthentication([
        //     'confirm' => true,
        //     'confirmPassword' => true,
            // 'window' => 0,
        // ]),
        // Features::passkeys([
        //     'confirmPassword' => true,
        // ]),
    ],
```

## Post-migration verification checklist

After the migration, verify at least the following:

<Steps>
  <Step title="Verify login / logout">
    Log in as an existing user and confirm the session persists correctly.
  </Step>

  <Step title="Verify registration">
    Register a new user and confirm you're redirected to the expected screen.
  </Step>

  <Step title="Verify password reset">
    Confirm the entire flow from the reset email, through the tokenized link, to completing the reset.
  </Step>
</Steps>

## Benefits after migration

After this migration, your app is aligned with the current Fortify-based starter kits.
As a result, enabling 2FA and Passkeys in the future becomes easier.

<Card title="Laravel Fortify and starter kits" icon="shield-check" href="/en/advanced/fortify">
  See this page if you want to dig into Fortify's internal design and go on to enable 2FA and passkeys.
</Card>

## References

* [Laravel Fortify repository](https://github.com/laravel/fortify)
* [Laravel 13.x Fortify docs](https://github.com/laravel/docs/blob/13.x/fortify.md)
* [React starter kit FortifyServiceProvider](https://github.com/laravel/react-starter-kit/blob/main/app/Providers/FortifyServiceProvider.php)


## Related topics

- [Laravel Fortify and Starter Kits](/en/advanced/fortify.md)
- [Migration Guide: Old Structure to Slim Application Skeleton](/en/advanced/app-structure-migration.md)
- [April 2026 Laravel updates](/en/blog/changelog/202604.md)
- [Upgrade guide: Laravel 11 to 12](/en/blog/upgrade-11-to-12.md)
- [Database migrations](/en/migrations.md)
