/** * @return Redirect */ public function store() { if (!$this->modelItem->isCreatable()) { return $this->redirectToTable(); } try { $this->modelRepository->store(); } catch (ValidationException $e) { return \Redirect::back()->withInput()->withErrors($e->getErrors()); } return $this->redirectToTable(); }