public function getAllPermissionsForRole($role)
    {
        /** @var EloquentRole $role */
        $role = $this->getRole($role);

        if ( ! $role) {
            return [];
        }

        $permissions = array_keys(array_filter($role->getPermissions()));
        sort($permissions);

        return $permissions;
    }
public function getAllPermissionsForRole($role)
    {
        /** @var EloquentRole $role */
        $role = $this->getRole($role);

        if ( ! $role) {
            return [];
        }

        $permissions = array_keys(array_filter($role->getPermissions()));
        sort($permissions);

        return $permissions;
    }
public function getAllPermissionsForRole ( $ role ) { /** @var EloquentRole $role */ $ role = $ this -> getRole ( $ role ) ; if ( ! $ role ) { return [ ] ; } $ permissions = array_keys ( array_filter ( $ role -> getPermissions ( ) ) ) ; sort ( $ permissions ) ; return $ permissions ; }
Returns all permission keys for a given role.

@param string $role
@return string[]
Returns all permission keys for a given role .