<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

// Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
//     return $request->user();
// });

// {} Librerías
// ! Peticiones
use Illuminate\Http\Request;

// ! Controladores

// + General
use App\Http\Controllers\Controlador;

// {} Controlador de la autenticación (inicio y cierre de sesión)

Route::controller(Controlador::class)->group(function() {

	Route::post('/autenticacion/iniciar', 'autenticacion')->name('autenticacion.iniciar');

});

// {} Controlador
Route::controller(Controlador::class)->group(function() {

    Route::post('/esquema', 'esquema')->name('esquema');

    Route::get('/ejecutar', 'ejecutar')->name('ejecutar');

    Route::post('/ejecutar', 'ejecutar')->name('ejecutar');

		Route::post('/sesion', 'sesion')->name('sesion');

})->middleware('auth:sanctum');