<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use DB;

class PaCtrl extends Controller
{
    public function prueba(Request $request)
    {
        $param1 = $request->get('param1');
        $param2 = $request->get('param2');
        $param3 = $request->get('param3');
        $param4 = $request->get('param4');
        $param5 = $request->get('param5');
        $result = DB::select(
            "call sp_create_programacion (?,?,?,?,?);",
            [$param1,$param2,$param3,$param4,$param5]
        );

        return [
            "message" => "todo bien",
            "res" => $result
        ];
    }
}
