{"record":{"id":"54b86e37785f2d7c","repo":"filamentphp/filament","slug":"the-class-class-must-be-an-instance-of-illumi","errorCode":null,"errorMessage":"The [{class}] class must be an instance of [Illuminate\\Database\\Eloquent\\Model] to use email authentication.","messagePattern":"The \\[(.+?)\\] class must be an instance of \\[Illuminate\\\\Database\\\\Eloquent\\\\Model\\] to use email authentication\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php","lineNumber":62,"sourceCode":"\n    public function getLoginFormLabel(): string\n    {\n        return __('filament-panels::auth/multi-factor/email/provider.login_form.label');\n    }\n\n    public function isEnabled(Authenticatable $user): bool\n    {\n        if (! ($user instanceof HasEmailAuthentication)) {\n            throw new LogicException('The user model must implement the [' . HasEmailAuthentication::class . '] interface to use email authentication.');\n        }\n\n        return $user->hasEmailAuthentication();\n    }\n\n    public function sendCode(HasEmailAuthentication $user): bool\n    {\n        if (! ($user instanceof Model)) {\n            throw new LogicException('The [' . $user::class . '] class must be an instance of [' . Model::class . '] to use email authentication.');\n        }\n\n        if (! method_exists($user, 'notify')) {\n            $userClass = $user::class;\n\n            throw new LogicException(\"Model [{$userClass}] does not have a [notify()] method.\");\n        }\n\n        $rateLimitingKey = \"filament-email-authentication:{$user->getKey()}\";\n\n        if (RateLimiter::tooManyAttempts($rateLimitingKey, maxAttempts: 2)) {\n            return false;\n        }\n\n        RateLimiter::hit($rateLimitingKey);\n\n        $code = $this->generateCode();\n        $codeExpiryMinutes = $this->getCodeExpiryMinutes();","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php#L44-L80","documentation":"Error \"The [{class}] class must be an instance of [Illuminate\\Database\\Eloquent\\Model] to use email authentication.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php:62 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}