Пример #1
0
 public function index_reg_com(Request $reguest)
 {
     $regiones = regiones::orderBY('name')->paginate(10);
     $comunas = comunas::orderBY('name')->paginate(10);
     $ciudades = ciudades::orderBY('name')->paginate(10);
     return view('general::reg_com.reg_com_list', compact('makeForm', 'regiones', 'comunas', 'ciudades'));
 }
Пример #2
0
 public function compose(View $view)
 {
     $makeForm = Request::only('region_id', 'comuna_id', 'desglosa_id', 'glosa_id', 'gl1_id', 'gl6_id');
     $reg_com = regiones::orderBy('name', 'ASC')->lists('name', 'id')->toArray();
     $com_com = array();
     if ($makeForm['region_id'] != null) {
         $com_com = Comunas::where('regiones_id', $makeForm['region_id'])->orderBy('name', 'DESC')->lists('name', 'id')->toArray();
     }
     $des_com = desglosas::orderBy('name', 'ASC')->lists('name', 'id')->toArray();
     $glo_com = array();
     if ($makeForm['desglosa_id'] != null) {
         $glo_com = glosas::where('desglosas_id', $makeForm['desglosa_id'])->orderBy('name', 'ASC')->lists('name', 'id')->toArray();
     }
     $nro = 1;
     $gl1_com = glosas::where('desglosas_id', $nro)->orderBy('name', 'ASC')->lists('name', 'id')->toArray();
     $nro = 6;
     $gl6_com = glosas::where('desglosas_id', $nro)->orderBy('name', 'ASC')->lists('name', 'id')->toArray();
     $view->with(compact('makeForm', 'reg_com', 'com_com', 'des_com', 'glo_com', 'gl1_com', 'gl6_com'));
 }
Пример #3
0
<?php

session_start();
$valido = $_SESSION['valido'];
if ($valido == "1") {
    require_once "../classes/regiones.php";
    $clase = new regiones();
    echo $clase->getRegiones();
}