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.'; }
/** * Remove the specified resource from storage. * * @param int $id * * @return Response */ public function destroy($id) { Tari::destroy($id); Session::flash('flash_message', 'Tari deleted!'); return redirect('auth/tari'); }
function getTaraROSelectBox() { return Tari::where('Name', 'Romania')->lists('Name', 'AidaID')->all(); }
/** * Show the form for editing the specified resource. * * @param int $id * * @return Response */ public function edit($id) { $regiuni = Regiuni::findOrFail($id); $tari = Tari::all()->lists('Name', 'AidaID'); return view('backend/geografie.regiuni.edit', compact('regiuni'), compact('tari')); }
/** * Show the form for editing the specified resource. * * @param int $id * * @return Response */ public function edit($id) { $orase = Orase::findOrFail($id); $tari = Tari::all()->lists('Name', 'AidaID'); return view('backend/geografie.orase.edit', compact('orase'), compact('tari')); }