Files
coruna-lab/app/Models/Admin.php
T
hashbro 74a67c3900 init
2026-08-08 05:09:01 +08:00

26 lines
493 B
PHP

<?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;
}
}