classify admin
This commit is contained in:
27
app/Models/NumberOtp.php
Normal file
27
app/Models/NumberOtp.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class NumberOtp extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'number_otps';
|
||||
|
||||
protected $fillable = [
|
||||
'number',
|
||||
'otp',
|
||||
'expire_at',
|
||||
'attempts'
|
||||
];
|
||||
|
||||
public function setOtpAttribute($value) {
|
||||
$this->attributes['otp'] = base64_encode($value);
|
||||
}
|
||||
|
||||
public function getOtpAttribute($value) {
|
||||
return base64_decode($value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user