Пример #1
0
 public function update($id, Request $request)
 {
     $categorie = categorie::find($request->input('categorie_id'));
     $product = product::find($id);
     $product->fill($request->all());
     $categorie->products()->save($product);
     return redirect()->back();
 }
 /**
  * @param $id
  * @return \Illuminate\Http\RedirectResponse
  */
 public function add($id)
 {
     $product = product::find($id);
     Cart::add($product->id, $product->name, 1, $product->price);
     Session::flash('success', "Het product is toegevoegd aan de winkelwagen");
     return redirect()->back();
 }