Multiple login models

Hello, how can I use multiple models to diferent logins?
Like user model and consumermodel?

I tried to build diferent panels and set a Login class in a customer panel, like that:

return $panel
          ->id('app')
          ->path('app')
          ->login(**AppLogin::class**)


So, in AppLogin class, I have duplicated all default Login class ( Filament\Pages\Auth\Login.php)

Well.. I think in the method I need to pass something to indicate I´d like to get Consumer models instead User model right?

public function authenticate(): ?LoginResponse
    {
        try {
            $this->rateLimit(5);
        } catch (TooManyRequestsException $exception) {
            // Catch implementation
        }
        $data = $this->form->getState();

        if (! Filament::auth()->attempt($this->getCredentialsFromFormData($data), $data['remember'] ?? false)) {
            throw ValidationException::withMessages([
                'data.email' => __('filament-panels::pages/auth/login.messages.failed'),
            ]);
        }

        session()->regenerate();

        return app(LoginResponse::class);
    }


But I really don´t know what I need to do here..
Someone can help me? Thanks
Was this page helpful?