Avoiding 'Route [filament.admin.auth.login] not defined' when customising Filament root

Filament is a great time-saver when building out admin functionality in a Laravel app. It takes care of a lot of the boilerplate needed when building CRUD-style admin apps. Typically Filament will run inside an admin section (/admin etc) while the main app runs on the domain root. But what if you want the whole app to be a Filament app, and have it run in the application root?

Updating Filament to run on the domain root

Typically Filament will default to running on /admin. Changing this is very simple. Go to your Filament panel config (something like App/Providers/Filament/AdminPanelProvider.php), and change the path() value:

class AdminPanelProvider extends PanelProvider
{
    public function panel(Panel $panel): Panel
    {
        return $panel
            ->default()
            ->id('admin')
            // Change from 'admin' to '' to run on the root
            ->path('')
            ->login()
            ...

Save the file, reload the app, and you should now see the functionality that used to live at /admin is at the root of your application.

Route errors

One snag when doing this on recent versions of Laravel is that you'll very quickly run into an error around authentication.

Route [filament.admin.auth.login] not defined

When running php artisan route:list, you'll see a lot of Filament-related urls, but login looks suspiciously short.

...
GET|HEAD   login ............................................................................................. login
POST       logout .................................... filament.admin.auth.logout › Filament\Http › LogoutController
GET|HEAD   users ........ filament.admin.resources.users.index › App\Filament\Resources\UserResource\Pages\ListUsers
GET|HEAD   users/create filament.admin.resources.users.create › App\Filament\Resources\UserResource\Pages\CreateUser
...

The problem is that there's a collision between Laravel's default auth and what we're now trying to do with Filament. To fix this, go to routes/web.php, and get rid of the route with ->name('login').

Route::middleware('guest')->group(function () {
    // This is the one to get rid of!
    Volt::route('login', 'pages.auth.login')
        ->name('login');

Once that route is removed, the collision is gone, and Filament can now handle our login. Generating a routes list confirms that login is now handled via Filament:

...
GET|HEAD   login ................................................ filament.admin.auth.login › Filament\Pages › Login
POST       logout .................................... filament.admin.auth.logout › Filament\Http › LogoutController
GET|HEAD   users ........ filament.admin.resources.users.index › App\Filament\Resources\UserResource\Pages\ListUsers
GET|HEAD   users/create filament.admin.resources.users.create › App\Filament\Resources\UserResource\Pages\CreateUser
...

This is a fairly simple fix, which allows you to move Filament from admin to the domain root without further problems!

Share This Article

Related Articles


ConFoo 2026, Montréal

My experience speaking at ConFoo 2026 in Montréal — two talks, a brilliant technical crowd, some excellent sessions, and a city that is genuinely something else in winter.

Redirecting Test Emails Safely in Laravel

A small Laravel feature that prevents a big headache: how Mail::alwaysTo() keeps staging and demo environments from accidentally emailing real users.

International PHP Conference, Berlin 2025

In June 2025, I spoke at IPC Berlin about idempotency - what it is, how it protects our APIs, and what goes wrong when we forget about it! It was a great conference, in a fascinating city.

Dutch PHP Conference, Amsterdam 2025

The Dutch PHP Conference in March 2025 was a great couple of days, where I got the opportunity to talk all about idempotency, and do it in a unique conference setting.

More