json(['data'=>BarangResource::collection($data), 'msg'=>'List all data pengguna ']); } public function show($id) { $data = Pengguna::where('id',$id)->get(); // dd($data); return response()->json(['data'=>BarangResource::collection($data), 'msg'=>'Detail Pengguna ']); } public function destroy($id) { $data = Pengguna::where('id',$id)->delete(); if($data){ return response()->json(['data'=>'', 'msg'=>'Data Pengguna Berhasil di hapus ']); }else{ return response()->json(['data'=>'', 'msg'=>'Data Pengguna Gagal di hapus ']); } } public function store(Request $request) { } public function jenis_barang() { $data = JenisBarang::all(); return response()->json(['data'=>BarangResource::collection($data), 'msg'=>'List Data Jenis Barang']); } }