admin
This commit is contained in:
+17
-2
@@ -6,15 +6,25 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
|
||||
class Admin extends Authenticatable
|
||||
{
|
||||
protected $fillable = ['username', 'password', 'is_super'];
|
||||
protected $fillable = [
|
||||
'username',
|
||||
'password',
|
||||
'is_super',
|
||||
'status',
|
||||
'google_auth_open',
|
||||
'google_secret',
|
||||
'last_ip',
|
||||
];
|
||||
|
||||
protected $hidden = ['password', 'remember_token'];
|
||||
protected $hidden = ['password', 'remember_token', 'google_secret'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'password' => 'hashed',
|
||||
'is_super' => 'integer',
|
||||
'status' => 'integer',
|
||||
'google_auth_open' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,4 +32,9 @@ class Admin extends Authenticatable
|
||||
{
|
||||
return (int) $this->is_super === 1;
|
||||
}
|
||||
|
||||
public function isEnabled(): bool
|
||||
{
|
||||
return (int) $this->status === 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ class Channel extends Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Domains for support-link display and builder deployment_domains.
|
||||
* Domains for support-link display and builder channel hosts.
|
||||
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS.
|
||||
*
|
||||
* @return list<string>
|
||||
|
||||
Reference in New Issue
Block a user