add api for harga emas and marhun
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\HargaEmas;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HargaEmasController extends Controller
|
||||
{
|
||||
public function showAllHargaEmas()
|
||||
{
|
||||
return response()->json(HargaEmas::all());
|
||||
}
|
||||
|
||||
public function update($id, Request $request)
|
||||
{
|
||||
$harga_emas = HargaEmas::findOrFail($id);
|
||||
$harga_emas->update($request->all());
|
||||
|
||||
return response()->json($harga_emas, 200);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user