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!


PHP UK Conference, London 2026

IPC Berlin Speaker

In February 2026, I'll be speaking at the PHP UK Conference in London. I'll be telling the story behind EverythingIsShowbiz.com, a site that went from a vibe-coded side project, to a useful experiment in integration of AI into PHP workflows.

Get your ticket now and I'll see you there!

Share This Article

Related Articles


More