/** * Store a new entry to the DB * @return Redirect */ public function store() { if ($id = $this->repository->create(Input::all())) { return Redirect::route('backend.content.' . $this->channel->name . '.edit', $id)->with('active_field_group', Input::get('active_field_group'))->withAlertSuccess("Saved."); } return Redirect::back()->withInput()->withErrors($this->repository->errors()); }
/** * Store new term * @return Redirect */ public function store() { $data = array_merge(array('taxonomy_id' => $this->taxonomy->name), Input::all()); if ($id = $this->termRepository->create($data)) { return Redirect::route('backend.taxonomies.' . $this->taxonomy->name . '.edit', $id)->withAlertSuccess("Saved."); } return Redirect::back()->withInput()->withErrors($this->termRepository->errors()); }