Skip to content

Instantly share code, notes, and snippets.

@erdum
Created December 28, 2025 14:06
Show Gist options
  • Select an option

  • Save erdum/b817074e4f1fd84a74619f8c3e04e858 to your computer and use it in GitHub Desktop.

Select an option

Save erdum/b817074e4f1fd84a74619f8c3e04e858 to your computer and use it in GitHub Desktop.
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Otp extends Model
{
use HasFactory;
protected $keyType = 'string';
protected $primaryKey = 'identifier';
protected $fillable = [
'identifier',
'value',
'retries',
'sent_at',
'expires_at',
'verified_at',
];
protected $casts = [
'sent_at' => 'datetime',
'expires_at' => 'datetime',
'verified_at' => 'datetime',
];
public $timestamps = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment