Add Lista de Narrativas - API
This commit is contained in:
parent
d4b9dabaa1
commit
46a5276843
@ -87,4 +87,12 @@ public function show($id){
|
|||||||
],404);
|
],404);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function listNarrativas(){
|
||||||
|
$narrativas = Narrativas::all();
|
||||||
|
return response([
|
||||||
|
"status" => 1,
|
||||||
|
"msg" => "!Lista de Narrativas",
|
||||||
|
"data" => $narrativas,
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
Route::get('narrativa/{id}', [NarrativasController::class,'show']);
|
Route::get('narrativa/{id}', [NarrativasController::class,'show']);
|
||||||
Route::put('narrativa',[NarrativasController::class,'update']);
|
Route::put('narrativa',[NarrativasController::class,'update']);
|
||||||
Route::delete('narrativa/{id}',[NarrativasController::class,'delete']);
|
Route::delete('narrativa/{id}',[NarrativasController::class,'delete']);
|
||||||
|
Route::get('narrativa', [NarrativasController::class,'listNarrativas']);
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user