{"record":{"id":"e3574316c184735f","repo":"filamentphp/filament","slug":"model-userclass-does-not-have-a-notify-me","errorCode":null,"errorMessage":"Model [{$userClass}] does not have a [notify()] method.","messagePattern":"Model \\[(.+?)\\] does not have a \\[notify\\(\\)\\] method\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php","lineNumber":68,"sourceCode":"    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();\n\n        session()->put($this->getCodeSessionKey($user), Hash::make($code));\n        session()->put($this->getCodeExpirySessionKey($user), now()->addMinutes($codeExpiryMinutes));\n\n        $user->notify(app($this->getCodeNotification(), [\n            'code' => $code,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php#L50-L86","documentation":"Error \"Model [{$userClass}] does not have a [notify()] method.\" thrown in filamentphp/filament.","triggerScenarios":"Thrown at packages/panels/src/Auth/MultiFactor/Email/EmailAuthentication.php:68 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"}