[]]], responses: [ new OA\Response( response: 200, description: "OK", content: new OA\JsonContent() ), new OA\Response( response: 401, description: "No autorizado", content: new OA\JsonContent( example: ["message" => "Unauthenticated."] ) ) ] )] public function index(Request $request) { $instituciones = Institucione::paginate(); return InstitucioneResource::collection($instituciones); } /** * Store a newly created resource in storage. */ public function store(InstitucioneRequest $request): JsonResponse { $institucione = Institucione::create($request->validated()); return response()->json(new InstitucioneResource($institucione)); } /** * Display the specified resource. */ public function show(Institucione $institucione): JsonResponse { return response()->json(new InstitucioneResource($institucione)); } /** * Update the specified resource in storage. */ public function update(InstitucioneRequest $request, Institucione $institucione): JsonResponse { $institucione->update($request->validated()); return response()->json(new InstitucioneResource($institucione)); } /** * Delete the specified resource. */ public function destroy(Institucione $institucione): Response { $institucione->delete(); return response()->noContent(); } }