public function generatePasswordPublic($id, Request $request)
 {
     $this->validate($request, ['password' => 'required|confirmed|min:6']);
     $request['password'] = bcrypt($request['password']);
     $user = User::find($id);
     $user->fill($request->all());
     $user->save();
     Session::flash('message', 'Password Generado de manera Exitosa');
     // suma el id + 987654321012345 y lo encripta
     $id = base64_encode($id + 987654321012345);
     //return Redirect::route('pass.generate',$id);
     return Redirect::route('login');
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'str_cedula' => $data['str_cedula'], 'str_nombre' => $data['str_nombre'], 'str_apellido' => $data['str_apellido'], 'password' => bcrypt($data['password']), 'email' => $data['email'], 'str_telefono' => $data['str_telefono'], 'lng_idrol' => $data['lng_idrol']]);
 }