public function postDeletefromcart() { $id = Input::get('id'); $orderitem = Orderitem::find($id); if ($orderitem) { $orderitem->delete(); return Redirect::to('/checkout')->with('message', 'Item successfully deleted from the cart.'); } return Redirect::back()->with('message', 'Could not delete the item from your cart. Please Try again. '); }
/** * Show the form for editing the specified orderitem. * * @param int $id * @return Response */ public function edit($id) { $orderitem = Orderitem::find($id); return View::make('admin.orderitems.edit', compact('orderitem')); }