mirror of
https://github.com/ProxyPanel/ProxyPanel.git
synced 2026-04-03 02:58:42 +00:00
29 lines
540 B
PHP
29 lines
540 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* 注册时的验证激活地址
|
|
*/
|
|
class Verify extends Model
|
|
{
|
|
protected $table = 'verify';
|
|
|
|
protected $guarded = [];
|
|
|
|
// 筛选类型
|
|
public function scopeType(Builder $query, int $type): Builder
|
|
{
|
|
return $query->whereType($type);
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|