PHP code example of w3-devmaster / laravel-geodata
1. Go to this page and download the library: Download w3-devmaster/laravel-geodata library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
w3-devmaster / laravel-geodata example snippets
use W3Devmaster\GeoData\GeoData;
$geodata = new GeoData();
$geographies = $geodata->geographies();
$provinces = $geodata->provinces();
$districts = $geodata->districts();
$subDistricts = $geodata->subDistricts();
// Or use static method
$geographies = GeoData::geographies();
$provinces = GeoData::provinces();
$districts = GeoData::districts();
$subDistricts = GeoData::subDistricts();
use W3Devmaster\GeoData\GeoData;
$province = GeoData::provinces()->first();
$districts = $province->districts;
use W3Devmaster\GeoData\GeoData;
$province = GeoData::provinces()->first();
$geography = $province->geography;
use W3Devmaster\GeoData\GeoData;
$provinces = GeoData::provinces()->findName('นครร')->get(); // Like Condition