public function getCadastro()
 {
     $associate = Auth::user()->user()->associate->asociado;
     $categories = ORGAssociateCategories::all();
     $logradouros = ORGBackyards::all();
     $ufs = ORGuf::all();
     $args = array('associate' => $associate, 'categories' => $categories, 'logradouros' => $logradouros, 'ufs' => $ufs, 'route' => self::$route, 'module' => 'associados_cadastro');
     return View::make('frontend.associates.cadastro')->with($args);
 }
Example #2
0
 public function getUpdate($id = '')
 {
     if ($id == '') {
         return Redirect::to($this->route);
     } else {
         $associate = ORGAssociates::find($id);
         if (!$associate) {
             return Redirect::to($this->route)->with('msg_error', Lang::get('messages.associates_display_err'));
         } else {
             $args = array('route' => $this->route, 'estados' => ORGStates::all(), 'formacoes' => ORGTrainings::all(), 'logradouros' => ORGBackyards::all(), 'categorias' => ORGAssociateCategories::all(), 'ufs' => ORGuf::all(), 'associate' => $associate);
             return View::make('backend.clients.associates.update')->with($args);
         }
     }
 }