src/Stevemo/Cpanel/Controllers/UsersPermissionsController.php
public function update($userId)
    {
        try
        {
            $permissions = Input::get('permissions', array());
            $this->users->updatePermissions($userId,$permissions);

            return Redirect::route('cpanel.users.index')
                ->with('success', Lang::get('cpanel::users.permissions_update_success'));
        }
        catch ( UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.permissions')
                ->with('error', $e->getMessage());
        }

    }
public function update($userId)
    {
        try
        {
            $permissions = Input::get('permissions', array());
            $this->users->updatePermissions($userId,$permissions);

            return Redirect::route('cpanel.users.index')
                ->with('success', Lang::get('cpanel::users.permissions_update_success'));
        }
        catch ( UserNotFoundException $e)
        {
            return Redirect::route('cpanel.users.permissions')
                ->with('error', $e->getMessage());
        }

    }
public function update ( $ userId ) { try { $ permissions = Input :: get ( 'permissions' , array ( ) ) ; $ this -> users -> updatePermissions ( $ userId , $ permissions ) ; return Redirect :: route ( 'cpanel.users.index' ) -> with ( 'success' , Lang :: get ( 'cpanel::users.permissions_update_success' ) ) ; } catch ( UserNotFoundException $ e ) { return Redirect :: route ( 'cpanel.users.permissions' ) -> with ( 'error' , $ e -> getMessage ( ) ) ; } }
Update user permissions

@author Steve Montambeault
@link   http://stevemo.ca

@param  int $userId
@return Response
Update user permissions