/** * @author Shivam Mathur <*****@*****.**> * * @return array */ public function Countries() { $Location = new Location(self::$databaseName, self::$collection); $allCountries = $Location->getAllCountries(); $countries = json_decode($allCountries); $data = []; foreach ($countries as $countryName) { $data[] = [$countryName]; } return $data; }
<?php namespace CountryCity\Templates; use CountryCity\API\Location; /** @var Location $Location */ $Location = new Location('countrycity', 'geo'); /** @var $data */ echo $Location->getAllCities($data['countryName']);
<?php namespace CountryCity\Templates; use CountryCity\API\Location; /** @var Location $Location */ $Location = new Location('countrycity', 'geo'); echo $Location->getAllCountries();