src/controllers/GroupController.php
public function addUserInGroup()
    {
        try {
            $user = Sentry::getUserProvider()->findById(Input::get('userId'));
            $group = Sentry::getGroupProvider()->findById(Input::get('groupId'));
            $user->addGroup($group);

            return Response::json(array('userAdded' => true, 'message' => trans('syntara::groups.messages.user-add-success'), 'messageType' => 'success'));
        } catch (\Cartalyst\Sentry\Users\UserNotFoundException $e) {
            return Response::json(array('userAdded' => false, 'message' => trans('syntara::users.messages.not-found'), 'messageType' => 'danger'));
        } catch(\Cartalyst\Sentry\Groups\GroupNotFoundException $e) {
            return Response::json(array('userAdded' => false, 'message' => trans('syntara::groups.messages.not-found'), 'messageType' => 'danger'));
        }
    }
public function addUserInGroup()
    {
        try {
            $user = Sentry::getUserProvider()->findById(Input::get('userId'));
            $group = Sentry::getGroupProvider()->findById(Input::get('groupId'));
            $user->addGroup($group);

            return Response::json(array('userAdded' => true, 'message' => trans('syntara::groups.messages.user-add-success'), 'messageType' => 'success'));
        } catch (\Cartalyst\Sentry\Users\UserNotFoundException $e) {
            return Response::json(array('userAdded' => false, 'message' => trans('syntara::users.messages.not-found'), 'messageType' => 'danger'));
        } catch(\Cartalyst\Sentry\Groups\GroupNotFoundException $e) {
            return Response::json(array('userAdded' => false, 'message' => trans('syntara::groups.messages.not-found'), 'messageType' => 'danger'));
        }
    }
Add a user in a group
@return Response