Fix when user is not defined and a test is made to $user->is_admin

This commit is contained in:
Deon George 2021-12-22 10:12:45 +11:00
parent 0edfa512c7
commit b20d7e2988

View File

@ -31,7 +31,7 @@ class User extends Model
*/
public function getIsAdminAttribute(): bool
{
return $this->admin;
return (bool)$this->admin;
}
/**