Fix when user is not defined and a test is made to $user->is_admin
This commit is contained in:
parent
0edfa512c7
commit
b20d7e2988
@ -31,7 +31,7 @@ class User extends Model
|
|||||||
*/
|
*/
|
||||||
public function getIsAdminAttribute(): bool
|
public function getIsAdminAttribute(): bool
|
||||||
{
|
{
|
||||||
return $this->admin;
|
return (bool)$this->admin;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user