roles icon indicating copy to clipboard operation
roles copied to clipboard

merge & fix syncRoles(), add syncPermissions() update documentation

Open webkonstantin opened this issue 9 years ago • 3 comments

webkonstantin avatar Dec 17 '15 10:12 webkonstantin

Any chance of getting some of this merged any time soon?

mackhankins avatar Feb 04 '16 15:02 mackhankins

@sw-double I'm not going through the pain of creating another pull request for this, but in the HasRoleAndPermission Trait you need to change SyncPermissions to

    /**
     * Sync permissions for a user.
     *
     * @param array|\Bican\Roles\Models\Permission[]|\Illuminate\Database\Eloquent\Collection $permissions
     * @return array
     */
    public function syncPermissions($permissions)
    {
        $this->userPermissions = null;

        return $this->userPermissions()->sync($permissions);
    }

mackhankins avatar Feb 05 '16 18:02 mackhankins

@mackhankins thanks! I believe it is fixed now

webkonstantin avatar Feb 05 '16 19:02 webkonstantin