PHP code example of chujc / amap-district

1. Go to this page and download the library: Download chujc/amap-district 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/ */

    

chujc / amap-district example snippets


use ChuJC\AMapDistrict\District;

$disrtict = new District();
//参数与返回接口 参考高德地图行政区域接口
$response = $disrtict->getDistrict(['keywords' => '重庆']);

bash
php artisan district:table
bash
php artisan migrate
bash
php artisan vendor:publish --provider="ChuJC\AMapDistrict\DistrictServiceProvider" --tag="config"
bash
php artisan district