|OtpVerificationToken newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|OtpVerificationToken newQuery() * @method static \Illuminate\Database\Eloquent\Builder|OtpVerificationToken query() * @method static \Illuminate\Database\Eloquent\Builder|OtpVerificationToken whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|OtpVerificationToken whereEmail($value) * @method static \Illuminate\Database\Eloquent\Builder|OtpVerificationToken whereToken($value) * * @mixin \Eloquent */ class OtpVerificationToken extends Model { protected $primaryKey = 'email'; protected $fillable = [ 'email', 'token', ]; protected $hidden = [ 'token', ]; protected $casts = [ 'created_at' => 'datetime', ]; public function isExpired(): bool { $expiryMinutes = config('auth.otp_timeout', 10); return $this->created_at->addMinutes($expiryMinutes)->isPast(); } }