示例#1
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     die;
     $paises = Pais::all();
     $provincias = Provincia::all();
     $departamentos = Departamento::all();
     $localidades = Localidad::all();
     $calles = Calle::all();
     $domicilios = Domicilio::all();
     $telefonos = Telefono::all();
     $emails = Email::all();
     $webs = Web::all();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $ciudad = new Ciudad();
     $ciudad->nombre = 'Valdivia';
     $ciudad->pais = '1';
     $ciudad->codigo_postal = $faker->postcode;
     $ciudad->save();
     $ciudad = new Ciudad();
     $ciudad->nombre = 'Puerto Montt';
     $ciudad->pais = '1';
     $ciudad->codigo_postal = $faker->postcode;
     $ciudad->save();
     $samples_temp = [];
     $pais = Pais::all();
     foreach ($pais as $item) {
         # code...
         $samples_temp[] = ['nombre' => 'Ciudad de ' . $item->nombre, 'pais' => $item->id, 'codigo_postal' => $faker->postcode];
     }
     Ciudad::insert($samples_temp);
 }
示例#3
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $pais = Pais::all()->lists('name', 'id');
     return view('admin/iva_form')->with('pais', $pais);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $paises = Pais::all();
     return view('admin.paises.tabla')->with('paises', $paises);
 }
示例#5
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function getAll()
 {
     return Pais::all();
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $paises = Pais::all()->lists('nombre', 'id');
     return view('admin.provincias.show')->with('provincia', $this->provincia)->with('paises', $paises);
 }