public function administracionAccessos(Request $request) { $usuario = User::find($request->id_user); $usuario->correo = $request->correo; $usuario->password = \Hash::make($request->password); $usuario->save(); EmailController::sendNotificationChangeAccessos(); }
static function reset($request) { $usuario = User::where('correo', $request->correo)->first(); if (count($usuario) > 0) { $psw = ""; for ($i = 0; $i <= 9; $i++) { $psw .= substr('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890', rand(0, 62), 1); } $usuario->password = \Hash::make($psw); $usuario->save(); EmailController::sendPassword($request->correo, $psw); return true; } return false; }