/** * constructor de la clase classBuilder */ public function classBuilder() { $href = route('people.' . $this->modelo . '.index'); $this->ruta = $this->listOneBreadcrumb($this->modelo, $href); $uri = getUriByController(); $this->webpage = ['tab_title' => ucwords($this->modelo), 'active' => $this->modelo, 'routes' => $uri, 'routes_json' => json_encode($uri), 'whereAmI' => $this->ruta]; }
public function __construct() { $this->modelo = 'localidades'; $href = route('cities.' . $this->modelo . '.index'); $this->ruta = $this->listOneBreadcrumb($this->modelo, $href); $this->webpage = ['tab_title' => ucwords($this->modelo), 'active' => $this->modelo, 'routes_json' => json_encode(getUriByController()), 'routes' => getUriByController(), 'whereAmI' => $this->ruta]; }
/** * constructor de la clase classBuilder */ public function classBuilder() { // $href = route($this->modelo); $this->webpage = ['tab_title' => ucwords('Lista de jugadores del club'), 'active' => 'club', 'routes_json' => json_encode(getUriByController()), 'routes' => getUriByController(), 'whereAmI' => $this->ruta]; if (Route::current()) { $this->routeParamters = Route::current()->parameters(); if (isset($this->routeParamters['id'])) { $route_id = $this->routeParamters['id']; $routes_json = $this->webpage['routes_json']; $this->webpage["routes_json"] = str_replace('#', $route_id, $routes_json); } } }
/** * Show all the items. * * @return Response */ public function listar() { $whereAmI = $this->ruta; $calles = Calle::with('localidad')->with('localidad.departamento')->with('localidad.departamento.provincia')->Paginate(7); $paginate_data = $this->paginateAditionalData($calles); $data = array_merge(['webpage' => $this->webpage, 'whereAmI' => $whereAmI, 'calles' => $calles, 'paginate_data' => $paginate_data], $this->data); $this->webpage['routes'] = json_encode(getUriByController()); return view('admin.cities.calles.index', $data); }
Route::get('roster/save', 'roster\\RosterController@save')->name('roster.save'); Route::get('/owner', 'owner\\OwnerController@index')->name('owner.index'); #========================================================================================== #=== cities =============================================================================== #========================================================================================== Route::resource('cities/localidades', 'cities\\LocalidadController'); Route::resource('cities/calles', 'cities\\CalleController'); Route::get('/cities/localidades/pais/{id}', function ($id) { return response()->json(['result' => 'Ok', 'response' => Localidad::listByFullName($id)]); }); Route::get('/search/localidades', ['as' => 'cities.localidades.search', 'uses' => 'cities\\LocalidadController@search']); #========================================================================================== #=== users & home ========================================================================= #========================================================================================== Route::get('home', ['as' => 'home', function () { $webpage = ['tab_title' => 'Inicio', 'active' => 'home', 'whereAmI' => '', 'routes_json' => json_encode(getUriByController()), 'routes' => getUriByController()]; $generos = App\Genero::listByFullName(); $paises = App\Pais::listByFullName(); $ciudades = App\Localidad::listByFullName(); $tdocs = App\TiposDocumentos::listByFullName(1); $entidades = App\Entidad::get(); $data = ['webpage' => $webpage, 'generos' => $generos, 'paises' => $paises, 'localidades' => $ciudades, 'tipos_documentos' => $tdocs, 'entidades' => $entidades]; return view('admin/home', $data); }]); /*Route::get('/tipos_documentos', function () { //DB::enableQueryLog(); $q = Input::get("pais"); $tipos = []; if ($q){ $tipos = TiposDocumentos::where("pais_id","=",$q)->get(); }
/** * Show all the items. * * @return Response */ public function listar(Request $request) { $whereAmI = $this->listOneBreadcrumb('users', '', 1); $users = User::nameOrEmail($request->get('name'))->Paginate(7); $paginate_data = $this->paginateAditionalData($users); $this->webpage['routes'] = json_encode(getUriByController()); $this->data = array_merge(['webpage' => $this->webpage, 'whereAmI' => $whereAmI, 'users' => $users, 'request' => $request, 'paginate_data' => $paginate_data], $this->data); return view('admin.users.index', $this->data); }