public function postCreate($idCartography) { $cartography = Cartography::find($idCartography); $cartography_author = new CartographyAuthor(); $cartography_author->cartography_id = $cartography->id; $cartography_author->first_name = Input::get('first_name'); $cartography_author->middle_name = Input::get('middle_name'); $cartography_author->last_name = Input::get('last_name'); $cartography_author->institution = Input::get('institution'); $cartography_author->email = Input::get('email'); $cartography_author->save(); return Redirect::to(self::parseRoute($idCartography))->with(array('msg_success' => 'Cartografia adicionada com sucesso')); }
public function getDelete($idAnnuity = '') { if ($idAnnuity == '') { return Redirect::to($this->route)->with('msg_error', Lang::get('messages.cartographies_display_err')); } else { $cartography = Cartography::find($idAnnuity); $delete = Cartography::destroy($idAnnuity); if (!$delete) { return Redirect::to($this->route)->with('msg_error', Lang::get('messages.cartographies_delete_err', array('title' => $cartography->title))); } else { return Redirect::to($this->route)->with('msg_success', Lang::get('messages.cartographies_delete', array('title' => $cartography->title))); } } }