public function GetAidaMapamond($operator)
 {
     $AidaTari = Soap::AidaSoap($operator, 'GlobeCountries', ['AIDA_GlobeCountriesRQ' => ['Filters' => '']])->Countries->Country;
     $AidaOrase = Soap::AidaSoap($operator, 'GlobeCities', ['AIDA_GlobeCitiesRQ' => ['Filters' => '']])->Cities->City;
     $AidaRegiuni = Soap::AidaSoap($operator, 'GlobeRegions', ['AIDA_GlobeRegionsRQ' => ['Filters' => '']])->Regions->Region;
     // insert tari
     foreach ($AidaTari as $tara) {
         $arrayTari = ['AidaID' => $tara->ID, 'Name' => $tara->Name, 'Iso' => @$tara->ISO2];
         Tari::UpdateOrCreate(['AidaID' => $tara->ID], $arrayTari);
     }
     // // insert orase
     foreach ($AidaOrase as $oras) {
         $arrayOrase = ['AidaID' => $oras->ID, 'Name' => $oras->Name, 'Country' => $oras->CountryID, 'Region' => @$oras->RegionID];
         Orase::UpdateOrCreate(['AidaID' => $oras->ID, 'Updatabil' => 1], $arrayOrase);
     }
     // insert regiuni
     foreach ($AidaRegiuni as $regiune) {
         $arrayRegiuni = ['AidaID' => $regiune->ID, 'Name' => $regiune->Name, 'Country' => $regiune->CountryID];
         Regiuni::UpdateOrCreate(['AidaID' => $oras->ID], $arrayRegiuni);
     }
     echo 'Actualizare finalizata cu success. Puteti inchide fereastra.';
 }
Beispiel #2
0
function getOrasInfo($AidaID)
{
    return Orase::where('AidaID', $AidaID)->first();
}
 public function ListareRezultateHoteluri(Request $request)
 {
     // dd($request->get('Oras'));
     $taraID = $request->Tara;
     $orasID = $request->Oras;
     $oras = Orase::where('AidaID', $orasID)->first();
     $hoteluri = Hoteluri::where('Country', $taraID)->where('City', $orasID)->orderby('Stars', 'desc')->get();
     return view('frontend.listare-hoteluri')->with('hoteluri', $hoteluri)->with('oras', $oras);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  *
  * @return Response
  */
 public function edit($id)
 {
     $primapaginaoferte = PrimaPaginaOferte::findOrFail($id);
     $orase = Orase::where('Country', $primapaginaoferte->Tara)->lists('Name', 'AidaID');
     $categorii = PrimaPaginaCateg::all()->lists('Nume', 'id');
     return view('backend.primapaginaoferte.edit', compact('primapaginaoferte', 'orase', 'categorii'));
 }
 public function ajaxAllOraseSelectBox(Request $request)
 {
     $orase = Orase::where('Country', $request->taraID)->lists('Name', 'AidaID');
     $output = "";
     foreach ($orase as $key => $oras) {
         $output .= "<option value=" . $key . ">" . $oras . "</option>";
     }
     return $output;
 }