/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(Request $request, $id) { $this->updateData($id); $user = Auth::user(); $data = Produk::findOrFail($id); $count = DB::table(produks)->count(); $tipe = Produk::lists('tipe', 'tipe'); return view('admin.updateProduk', compact('user', 'data', 'count', 'tipe')); }