add isRootAdmin() method to User model to get rid of User->root_admin === 1
This commit is contained in:
parent
d3d1b88135
commit
c0df57c087
1 changed files with 9 additions and 0 deletions
|
@ -146,4 +146,13 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
|||
{
|
||||
$this->notify(new ResetPasswordNotification($token));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true or false depending on wether the user is root admin or not.
|
||||
*
|
||||
* @return boolean the user is root admin
|
||||
*/
|
||||
public function isRootAdmin() {
|
||||
return $this->root_admin === 1;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue