Exemplo n.º 1
0
 /**
  * Handle the editing of a category.
  *
  * @param mixed $id
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postView($id)
 {
     $form = $this->categories->getForm();
     if (!$form->isValid()) {
         return $this->redirectRoute('admin.categories.view', $id)->withErrors($form->getErrors())->withInput();
     }
     $category = $this->categories->update($id, $form->getInputData());
     return $this->redirectRoute('admin.categories.view', $id);
 }