From 5dc4551b7ce114740afeb5fc4067cd18a9ddfae8 Mon Sep 17 00:00:00 2001 From: dipta ikromi m Date: Sat, 20 Aug 2022 23:03:25 +0700 Subject: [PATCH] add 4 field in stored,updates fungsi --- app/Http/Controllers/BarangController.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/BarangController.php b/app/Http/Controllers/BarangController.php index 9343abe..78f7a97 100644 --- a/app/Http/Controllers/BarangController.php +++ b/app/Http/Controllers/BarangController.php @@ -52,7 +52,11 @@ public function store(Request $request) 'jenis_barang_id'=>$request->jenis_barang, 'satuan_id'=>$request->satuan_barang, 'jumlah_barang'=>$request->jumlah, - 'lokasi'=>$request->lokasi + 'lokasi'=>$request->lokasi, + 'harga'=>$request->harga_barang, + 'nup'=>$request->nup, + 'kategori_simak_id'=>$request->kategori_simak, + 'kode_barang'=>$request->kode_barang ); $insert = DB::table('tbl_barang')->insert($data); @@ -105,6 +109,10 @@ public function updates_barang(Request $request) 'tanggal_masuk'=>$request->tanggal_masuk, 'keterangan'=>$request->keterangan, 'image'=>$fileName, + 'kode_barang'=>$request->kode_barang, + 'kategori_simak_id'=>$request->kategori_simak, + 'harga'=>$request->harga_barang, + 'nup'=>$request->nup, );