mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-16 14:00:56 +08:00
user add exists method
This commit is contained in:
@@ -137,6 +137,11 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
return $result;
|
||||
}
|
||||
|
||||
public static function exists($id): bool
|
||||
{
|
||||
return self::query()->where("id", $id)->exists();
|
||||
}
|
||||
|
||||
public function canAccessFilament(): bool
|
||||
{
|
||||
return $this->canAccessAdmin();
|
||||
|
||||
Reference in New Issue
Block a user