Esempio n. 1
0
 public function getDelete($id = '')
 {
     if ($id == '') {
         return Redirect::to($this->route)->with('msg_error', Lang::get('messages.users_display_err'));
     } else {
         $cartography_user = CartographyUser::find($id);
         $delete = CartographyUser::destroy($id);
         if (!$delete) {
             return Redirect::to($this->route)->with('msg_error', Lang::get('messages.users_delete_err', array('title' => $cartography_user->title)));
         } else {
             return Redirect::to($this->route)->with('msg_success', Lang::get('messages.users_delete', array('title' => $cartography_user->title)));
         }
     }
 }
Esempio n. 2
0
 public function getCreate()
 {
     return View::make('backend.cartographies.create', array('cartography_users' => CartographyUser::all(), 'route' => $this->route, 'msg_success' => Session::get('msg_success'), 'msg_error' => Session::get('msg_error')));
 }