public function postInvitarAmigo(ServiciosOperadorRepository $gestion) { $inputData = Input::get('formData'); parse_str($inputData, $formFields); $validator = Validator::make($formFields, Invitaciones_Amigos::$rulesP); if ($validator->fails()) { return response()->json(array('fail' => true, 'errors' => $validator->getMessageBag()->toArray())); } $object = $gestion->storeNewInviarAmigo($formFields); $this->dispatch(new InviteFriendsMail($object)); return response()->json(array('success' => true, 'message' => trans('front/verify.message'))); }