/**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(PostCategoryRequest $request, $id)
 {
     $category = Category::findOrFail($id);
     $category->update($request->all());
     Session::flash('message', "Você editou a categoria {$category->getNameAttribute()} com sucesso!");
     return redirect()->route('dashboard.category.index');
 }
Ejemplo n.º 2
0
 public function update(PostCategoryRequest $input, $id)
 {
     $category = Category::find($id);
     $category->update($input->all());
     return redicrect()->route('dashboard.category.index');
 }