Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 124 | All time: 9,456 This week: 560 |
Version | License | PHP version | Categories | |||
locatable 1.0.0 | Custom (specified... | 7 | Geography, PHP 7 |
Install the latest version using Composer:
$ composer require raggitech/laravel-locatable
<a name="TZ"></a>
$timezones = getTimeZones();
/
* ...
* +"Europe/Athens": "(UTC+02:00) Athens"
* +"Europe/Bucharest": "(UTC+02:00) Bucharest"
* +"Africa/Cairo": "(UTC+02:00) Cairo"
* +"Africa/Harare": "(UTC+02:00) Harare"
* +"Europe/Helsinki": "(UTC+02:00) Kyiv"
* +"Europe/Istanbul": "(UTC+02:00) Istanbul"
* +"Asia/Jerusalem": "(UTC+02:00) Jerusalem"
* ...
*/
<a name="Continents"></a>
$continents = getContinents();
/
* +"AF": "Africa"
* +"AN": "Antarctica"
* +"AS": "Asia"
* ...
*/
echo getContinent('AF', 'ar'); // ???????
<a name="Countries"></a>
$countriesNames = getCountriesNames();
/
* +"AF": "Afghanistan"
* +"AX": "Aland Islands"
* +"AL": "Albania"
* +"DZ": "Algeria"
* +"AS": "American Samoa"
* ...
*/
$countries = getCountries();
/
* ...
* +"EG": array:9 [?
* "iso" => "EGY"
* "name" => "Egypt"
* "native" => "????"
* "currency" => "EGP"
* "phone" => "20"
* "timezone" => "Africa/Cairo"
* "languages" => array:1 [?
* 0 => "AR"
* ]
* "continent" => "AF"
* "capital" => "Cairo"
* ]
* ...
*/
$country = getCountry('EG', 'ar'); // Same result with "name" => "???"
<a name="States"></a>
$states = getStates('EG');
/
* +"ALX": "Alexandria Governorate"
* +"ASN": "Aswan Governorate"
* +"AST": "Asyut Governorate"
* .....
*/
echo getStates('ALX', 'EG'); // Alexandria Governorate
Files (12) |
File | Role | Description | ||
---|---|---|---|---|
src (1 file, 2 directories) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (12) | / | src |
File | Role | Description | ||
---|---|---|---|---|
data (4 files) | ||||
lang (2 directories) | ||||
Helpers.php | Class | Functions that get country information from arrays into objects |
Files (12) | / | src | / | data |
File | Role | Description |
---|---|---|
continent.php | Aux. | Auxiliary script |
country.php | Aux. | Auxiliary script |
states.php | Aux. | Auxiliary script |
timezone.php | Aux. | Auxiliary script |
Files (12) | / | src | / | lang | / | ar |
File | Role | Description |
---|---|---|
continent.php | Aux. | Auxiliary script |
country.php | Aux. | Auxiliary script |
timezone.php | Aux. | Auxiliary script |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.