update api

This commit is contained in:
2026-02-20 23:52:38 +07:00
parent 1dfcf9b2f5
commit c19e39fe5e
13 changed files with 628 additions and 16 deletions
@@ -0,0 +1,67 @@
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Models\Komoditas\Komoditas;
class KomoditasController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index(): JsonResponse
{
return response()->json(Komoditas::all());
}
/**
* Show the form for creating a new resource.
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(string $id): JsonResponse
{
return response()->json(Komoditas::findOrFail($id));
}
/**
* Show the form for editing the specified resource.
*/
public function edit(string $id)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, string $id)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(string $id)
{
//
}
}