/**
  * @param Request $request
  */
 public function update($id, Request $request)
 {
     $categorie = categorie::find($id);
     $categorie->fill($request->all());
     $categorie->slug = $request->name;
     $categorie->save();
     return redirect()->action('Cms\\CategorieController@index');
 }
Пример #2
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();
 }