mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-04 19:49:16 +00:00
20 lines
384 B
PHP
20 lines
384 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* 注册时的激活验证码
|
|
*/
|
|
class VerifyCode extends Model
|
|
{
|
|
protected $table = 'verify_code';
|
|
protected $guarded = [];
|
|
|
|
public function scopeRecentUnused($query)
|
|
{
|
|
return $query->whereStatus(0)->where('created_at', '<=', date('Y-m-d H:i:s', strtotime('-15 minutes')));
|
|
}
|
|
}
|