public function hasPermissionThroughRole($permission)
    {
        if (! $this->isMethodRolesExists()) {
            return false;
        }

        if (! $permission = $this->preparePermission($permission)) {
            return false;   
        }

        foreach ($permission->roles as $role) { 
            if ($this->roles->contains($role)) {
                return true;
            }
        }

        return false;
    }
public function hasPermissionThroughRole($permission)
    {
        if (! $this->isMethodRolesExists()) {
            return false;
        }

        if (! $permission = $this->preparePermission($permission)) {
            return false;   
        }

        foreach ($permission->roles as $role) { 
            if ($this->roles->contains($role)) {
                return true;
            }
        }

        return false;
    }
public function hasPermissionThroughRole ( $ permission ) { if ( ! $ this -> isMethodRolesExists ( ) ) { return false ; } if ( ! $ permission = $ this -> preparePermission ( $ permission ) ) { return false ; } foreach ( $ permission -> roles as $ role ) { if ( $ this -> roles -> contains ( $ role ) ) { return true ; } } return false ; }
Has permission through role

@param Permission|string $permission
@return boolean
Has permission through role