public function update($id) { $status = $_POST['status']; $penjualan = Penjualan::findOrFail($id); $penjualan->status = $status; if ($penjualan->save()) { return Redirect::back()->with('message', 'sukses update status'); } }