public function getIndex() { if (Session::has('THOT')) { $input = array("ClientId" => "ApiIntegration", "UserName" => "appan", "Password" => "appan@1234", "LoginType" => "2", "EndUserIp" => Session::get('clientip')); $login = Hotel::login(json_encode($input)); Session::put('token_id', $login->TokenId); //print_r(Session::all()); $countryinput = Jsonhotel::country(); $countryoutput = Hotel::country($countryinput); if ($countryoutput && $countryoutput->Status == 1) { $countrydata = Xmltoarray::arr($countryoutput->CountryList); //print_r($countrydata['COUNTRIES']['COUNTRY']); exit; return View::make('retailer.hotel.addview')->with('city', $countrydata['COUNTRIES']['COUNTRY']); } else { return View::make('retailer.service'); } } else { return View::make('retailer.static'); } }