2022-06-14 01:21:39 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
use App\Http\Controllers\Api\UserController;
|
2022-07-09 03:09:04 +00:00
|
|
|
use App\Http\Controllers\Api\EstandarController;
|
2022-06-14 01:21:39 +00:00
|
|
|
|
|
|
|
Route::post('register', [UserController::class, 'register']);
|
|
|
|
Route::post('login', [UserController::class, 'login']);
|
|
|
|
|
|
|
|
Route::middleware("auth:sanctum")->group (function(){
|
2022-07-09 03:09:04 +00:00
|
|
|
//rutas auth
|
2022-06-14 01:21:39 +00:00
|
|
|
Route::get('user-profile', [UserController::class,'userProfile']);
|
|
|
|
Route::get('logout', [UserController::class, 'logout']);
|
2022-07-09 03:09:04 +00:00
|
|
|
|
|
|
|
//rutas estandar
|
|
|
|
Route::post('estandar', [EstandarController::class,'createEstandar']);
|
|
|
|
Route::get('estandar', [EstandarController::class,'listEstandar']);
|
|
|
|
Route::get('estandar/{id}', [EstandarController::class,'showEstandar']);
|
|
|
|
Route::put('estandar/{id}', [EstandarController::class,'updateEstandar']);
|
|
|
|
Route::delete('estandar/{id}', [EstandarController::class,'deleteEstandar']);
|
|
|
|
|
|
|
|
/*Route::controller(EstandarController::class)->group(function(){
|
|
|
|
Route::post('estandar/create', 'createEstandar');
|
|
|
|
Route::get('estandar/list', 'listEstandar');
|
|
|
|
Route::get('estandar/{id}', 'showEstandar');
|
|
|
|
Route::put('estandar/update/{id}', 'updateEstandar');
|
|
|
|
Route::delete('estandar/delete/{id}', 'deleteEstandar');
|
|
|
|
});*/
|
2022-06-14 01:21:39 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
|
|
|
return $request->user();
|
|
|
|
});
|