添加 判断实名路由

This commit is contained in:
iVampireSP.com 2023-01-15 08:34:20 +08:00
parent a1fa27b17a
commit 729dbdcfa8
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -118,6 +118,11 @@ public function isAdult(): bool
return $this->birthday_at->diffInYears(now()) >= 18; return $this->birthday_at->diffInYears(now()) >= 18;
} }
public function isRealNamed(): bool
{
return $this->real_name_verified_at !== null;
}
public function user_group(): BelongsTo public function user_group(): BelongsTo
{ {
return $this->belongsTo(UserGroup::class); return $this->belongsTo(UserGroup::class);