© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
6 replies
Wim

Adding routes to Filament auth middleware

I have a Filament user panel where a website user can do normal CRUD operations after he logs in.

I want to integrate Stripe billing in the user panel. I can show the (typical) Stripe logout form. I would like this form to be only available when a user is logged in in the user panel. A user that is not loggin in should be redirected to the login page. The associated route is under
/user/billing
/user/billing
.

I was adding it to my usual Laravel routes file as follows:

Route::middleware('auth')->group(function () {
    Route::get('/user/billing', Billing::class)->name('billing');
});
Route::middleware('auth')->group(function () {
    Route::get('/user/billing', Billing::class)->name('billing');
});


but then I get the
Route [login] not defined
Route [login] not defined
because it checks the
app\Http\Middleware\Authenticate.php
app\Http\Middleware\Authenticate.php
file which does refer to login (but not the login from Filament).

Any idea how to fix this?
Solution
Thanks. Based on your response I have tried two things. Both work
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to get Filament Auth middleware?
FilamentFFilament / ❓┊help
2y ago
Middleware auth + custom in Filament Blade
FilamentFFilament / ❓┊help
11mo ago
Disable auth middleware on filament pages
FilamentFFilament / ❓┊help
3y ago
Wrong filament routes/conflicting routes
FilamentFFilament / ❓┊help
3y ago