<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ApiController;

Route::get('/', function () {
    return view('welcome');
});



// Route::middleware('auth:sanctum')->group(function () {
//     Route::get('datos', [ApiController::class, 'index']);
//     Route::get('datos/{cups}', [ApiController::class, 'show']);
//     Route::get('datos/filter/{date}', [ApiController::class, 'filterByDate']);
// });


// Route::get('generateToken', [ApiController::class, 'generateToken']);



Route::middleware([])->group(function () {
    //Route::get('datos', [ApiController::class, 'index']);

    //Route::get('datos/filter/{date}', [ApiController::class, 'filterCupsByDate']);

    //Nos rescata datos del un CUP que le pasemos
    Route::get('datos/{cups}', [ApiController::class, 'show']);

    //Nos rescata datos cuando le pasamos un CUP y una Fecha.
    Route::get('datos/filter/{cups}/{date}', [ApiController::class, 'filterByDateBC']);




});

Route::get('someMethod', [ApiController::class, 'someMethod']);

Route::get('/api-documentacion', function () {
    return view('api-documentacion');
})->name('api.documentacion');



