Entities/Entrust/EloquentUser.php
public function can($permission, $requireAll = false)
    {
        if ($this->cachedRoles()->where('name', 'admin')->count()) {
            return true;
        }

        return $this->entrustCan($permission, $requireAll = false);
    }
public function can($permission, $requireAll = false)
    {
        if ($this->cachedRoles()->where('name', 'admin')->count()) {
            return true;
        }

        return $this->entrustCan($permission, $requireAll = false);
    }
public function can ( $ permission , $ requireAll = false ) { if ( $ this -> cachedRoles ( ) -> where ( 'name' , 'admin' ) -> count ( ) ) { return true ; } return $ this -> entrustCan ( $ permission , $ requireAll = false ) ; }
Check if user has a permission by its name.
return rearly if the user is in the admin group.

@param string|array $permission Permission string or array of permissions.
@param bool $requireAll All permissions in the array are required.

@return bool
Check if user has a permission by its name . return rearly if the user is in the admin group .