This commit is contained in:
hashbro
2026-08-08 05:09:01 +08:00
parent 03a40105fc
commit 74a67c3900
523 changed files with 669 additions and 5965 deletions
+25
View File
@@ -0,0 +1,25 @@
<?php
namespace App\Models;
use Illuminate\Foundation\Auth\User as Authenticatable;
class Admin extends Authenticatable
{
protected $fillable = ['username', 'password', 'is_super'];
protected $hidden = ['password', 'remember_token'];
protected function casts(): array
{
return [
'password' => 'hashed',
'is_super' => 'integer',
];
}
public function isSuper(): bool
{
return (int) $this->is_super === 1;
}
}