https and sms job add
This commit is contained in:
25
app/Models/EskizToken.php
Normal file
25
app/Models/EskizToken.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class EskizToken extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['token', 'expires_at'];
|
||||
|
||||
protected $dates = ['expires_at'];
|
||||
|
||||
/**
|
||||
* Token amal qiladimi?
|
||||
*/
|
||||
public function isValid(): bool
|
||||
{
|
||||
return $this->expires_at && Carbon::now()->lt($this->expires_at);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user