This commit is contained in:
hashbro
2026-08-07 05:21:44 +08:00
parent 5145b6f719
commit 78b61f85d2
325 changed files with 9874 additions and 1738 deletions
+7 -1
View File
@@ -6,7 +6,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
class Admin extends Authenticatable
{
protected $fillable = ['username', 'password'];
protected $fillable = ['username', 'password', 'is_super'];
protected $hidden = ['password', 'remember_token'];
@@ -14,6 +14,12 @@ class Admin extends Authenticatable
{
return [
'password' => 'hashed',
'is_super' => 'integer',
];
}
public function isSuper(): bool
{
return (int) $this->is_super === 1;
}
}