Example #1
0
 /**
  * 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());
 }
Example #2
0
 /**
  * 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());
 }