add isRootAdmin() method to User model to get rid of User->root_admin === 1
This commit is contained in:
parent
d3d1b88135
commit
c0df57c087
|
@ -146,4 +146,13 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
||||||
{
|
{
|
||||||
$this->notify(new ResetPasswordNotification($token));
|
$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 New Issue