<?php

namespace Daite\Coopdigital\Http\Controllers;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

// * Base de datos
use Illuminate\Support\Facades\DB;

class ControladorContrasena extends Controller {

    public function recuperacionContrasena(Request $request) {

        return view('coopdigital::recuperacionContrasena');

    }

    public function recuperarContrasena(Request $request) {

        $correo = $request->correo;
        $cedula = $request->cedula;

        $consulta = "EXEC [appmovil].[p_validar_valores_pantalla] '$correo', 'RECUPERAR_CLAVE', '', '', '$cedula'";

        $registrosBaseDatos = DB::select($consulta);

        return $registrosBaseDatos;

    }

}
