mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-01-17 18:08:06 +00:00
Complete POST /accounts admin endpoints Handle expiration in email and phone endpoints Complete documentation Add related tests Bump package version
28 lines
531 B
PHP
28 lines
531 B
PHP
<?php
|
|
|
|
namespace App;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class ActivationExpiration extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $connection = 'local';
|
|
protected $casts = [
|
|
'expires' => 'datetime:Y-m-d H:i:s',
|
|
];
|
|
|
|
public function account()
|
|
{
|
|
return $this->belongsTo('App\Account');
|
|
}
|
|
|
|
public function isExpired()
|
|
{
|
|
$now = Carbon::now();
|
|
return $this->expires->lessThan($now);
|
|
}
|
|
}
|