© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•11mo ago•
12 replies
Arlyzatun

Middleware auth + custom in Filament Blade

can i ask something differnt? i have some page
/building/id
/my/transaction
/my/booking

btw, for now, i will stay on /admin/login as login page route

i want to make a middleware for check does user have change their default password? if not they will redirect ot reset-password page, if user already change their default password, they can acccess di page

class CheckFirstLogin
{
    public function handle(Request $request, Closure $next)
    {
        $user = Auth::user();

        if ($user && $user->is_first == 1) {
            Password::sendResetLink(['email' => $user->email]);
            return redirect('/reset-password-send')->with('status', 'Silakan cek email Anda untuk reset password.');
        }

        return $next($request);
    }
}
class CheckFirstLogin
{
    public function handle(Request $request, Closure $next)
    {
        $user = Auth::user();

        if ($user && $user->is_first == 1) {
            Password::sendResetLink(['email' => $user->email]);
            return redirect('/reset-password-send')->with('status', 'Silakan cek email Anda untuk reset password.');
        }

        return $next($request);
    }
}



how do i implement this middleware in filament, i also want to check if user already login or not, if they didnt login yet, the will redirected to login page
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

Custom Middleware in Filament
FilamentFFilament / ❓┊help
3y ago
Filament Table in Blade
FilamentFFilament / ❓┊help
2y ago
Custom page with filament blade component
FilamentFFilament / ❓┊help
3y ago
How to get Filament Auth middleware?
FilamentFFilament / ❓┊help
2y ago