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-07-27 05:42:33 +00:00
|
|
|
use App\Http\Controllers\Api\PlanController;
|
2022-08-02 04:44:21 +00:00
|
|
|
use App\Http\Controllers\Api\AccionesMejorasController;
|
|
|
|
use App\Http\Controllers\Api\CausasRaicesController;
|
|
|
|
use App\Http\Controllers\Api\FuentesController;
|
|
|
|
use App\Http\Controllers\Api\ObservacionesController;
|
|
|
|
use App\Http\Controllers\Api\ProblemasOportunidadesController;
|
|
|
|
use App\Http\Controllers\Api\RecursosController;
|
2022-08-05 06:25:59 +00:00
|
|
|
use App\Http\Controllers\Api\MetasController;
|
2022-08-09 05:04:46 +00:00
|
|
|
use App\Http\Controllers\Api\FuentesValoresController;
|
|
|
|
use App\Http\Controllers\Api\ResponsablesValoresController;
|
2022-08-13 02:27:34 +00:00
|
|
|
use App\Http\Controllers\Api\ResponsablesController;
|
|
|
|
use App\Http\Controllers\Api\EstadosValoresController;
|
2022-08-17 01:11:22 +00:00
|
|
|
use App\Http\Controllers\Api\EvidenciasController;
|
2022-08-13 02:27:34 +00:00
|
|
|
|
2022-06-14 01:21:39 +00:00
|
|
|
|
|
|
|
Route::post('register', [UserController::class, 'register']);
|
2022-08-09 05:04:46 +00:00
|
|
|
Route::post('login', [UserController::class, 'login'])->name('login');
|
|
|
|
|
|
|
|
//Responsables Valores
|
|
|
|
Route::get('responsables',[ResponsablesValoresController::class,'listResponsablesValores']);
|
|
|
|
//fuentes Valores
|
|
|
|
Route::get('fuentes',[FuentesValoresController::class,'listFuentesValores']);
|
2022-08-17 01:11:22 +00:00
|
|
|
//Estados valores
|
2022-08-13 02:27:34 +00:00
|
|
|
Route::get('estados',[EstadosValoresController::class,'listEstadosValores']);
|
2022-08-17 01:11:22 +00:00
|
|
|
//Estandares valores
|
2022-08-13 02:27:34 +00:00
|
|
|
Route::get('estandares', [EstandarController::class,'listEstandarValores']);
|
2022-06-14 01:21:39 +00:00
|
|
|
|
|
|
|
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']);
|
|
|
|
|
2022-07-27 05:42:33 +00:00
|
|
|
//rutas plan
|
|
|
|
Route::post('plan',[PlanController::class,'createPlan']);
|
|
|
|
Route::get('plan',[PlanController::class,'listPlan']);
|
|
|
|
Route::get('plan/{id}',[PlanController::class,'showPlan']);
|
|
|
|
Route::delete('plan/{id}',[PlanController::class,'deletePlan']);
|
2022-08-17 03:18:49 +00:00
|
|
|
Route::put('plan',[PlanController::class,'updatePlan']);
|
2022-08-02 04:44:21 +00:00
|
|
|
|
|
|
|
//rutas metas
|
|
|
|
Route::post('meta',[MetasController::class,'create']);
|
|
|
|
Route::put('meta',[MetasController::class,'update']);
|
|
|
|
Route::delete('meta/{id}',[MetasController::class,'delete']);
|
|
|
|
|
|
|
|
//rutas accionesmejoras
|
|
|
|
Route::post('accionmejora',[AccionesMejorasController::class,'create']);
|
|
|
|
Route::put('accionmejora',[AccionesMejorasController::class,'update']);
|
|
|
|
Route::delete('accionmejora/{id}',[AccionesMejorasController::class,'delete']);
|
|
|
|
|
|
|
|
//rutas fuentes
|
|
|
|
Route::post('fuente',[FuentesController::class,'create']);
|
|
|
|
Route::put('fuente',[FuentesController::class,'update']);
|
|
|
|
Route::delete('fuente/{id}',[FuentesController::class,'delete']);
|
|
|
|
|
|
|
|
//rutas observaciones
|
|
|
|
Route::post('observacion',[ObservacionesController::class,'create']);
|
|
|
|
Route::put('observacion',[ObservacionesController::class,'update']);
|
|
|
|
Route::delete('observacion/{id}',[ObservacionesController::class,'delete']);
|
|
|
|
|
|
|
|
//rutas problemas
|
|
|
|
Route::post('problema',[ProblemasOportunidadesController::class,'create']);
|
|
|
|
Route::put('problema',[ProblemasOportunidadesController::class,'update']);
|
|
|
|
Route::delete('problema/{id}',[ProblemasOportunidadesController::class,'delete']);
|
2022-07-27 05:42:33 +00:00
|
|
|
|
2022-08-02 04:44:21 +00:00
|
|
|
//rutas recursos
|
|
|
|
Route::post('recurso',[RecursosController::class,'create']);
|
|
|
|
Route::put('recurso',[RecursosController::class,'update']);
|
|
|
|
Route::delete('recurso/{id}',[RecursosController::class,'delete']);
|
2022-08-17 01:11:22 +00:00
|
|
|
|
2022-08-02 04:44:21 +00:00
|
|
|
//rutas casuasraiz
|
|
|
|
Route::post('causa',[CausasRaicesController::class,'create']);
|
|
|
|
Route::put('causa',[CausasRaicesController::class,'update']);
|
|
|
|
Route::delete('causa/{id}',[CausasRaicesController::class,'delete']);
|
2022-08-01 01:21:58 +00:00
|
|
|
|
2022-08-09 05:04:46 +00:00
|
|
|
//ruta responsables
|
2022-08-13 02:27:34 +00:00
|
|
|
Route::post('responsable',[ResponsablesController::class,'create']);
|
|
|
|
Route::put('responsable',[ResponsablesController::class,'update']);
|
|
|
|
Route::delete('responsable/{id}',[ResponsablesController::class,'delete']);
|
2022-08-01 01:21:58 +00:00
|
|
|
|
2022-08-17 01:11:22 +00:00
|
|
|
//ruta evidencias
|
|
|
|
Route::post('evidencia',[EvidenciasController::class,'create']);
|
|
|
|
Route::get('evidencia/download/{id}', [EvidenciasController::class,'download']);
|
|
|
|
Route::get('evidencia/{id}', [EvidenciasController::class,'show']);
|
|
|
|
Route::put('evidencia',[EvidenciasController::class,'update']);
|
|
|
|
Route::delete('evidencia/{id}',[EvidenciasController::class,'delete']);
|
2022-06-14 01:21:39 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
|
|
|
return $request->user();
|
|
|
|
});
|