PHP code example of youruan / laravel-admin-china-distpicker
1. Go to this page and download the library: Download youruan/laravel-admin-china-distpicker 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/ */
youruan / laravel-admin-china-distpicker example snippets
'extensions' => [
'china-distpicker' => [
// 如果要关掉这个扩展,设置为false
'enable' => true,
]
]
$form->distpicker(['province_id', 'city_id', 'district_id']);
$form->distpicker([
'province_id' => '省份',
'city_id' => '市',
'district_id' => '区'
], '地域选择')->default([
'province' => 130000,
'city' => 130200,
'district' => 130203,
]);
$form->distpicker([
'province_id' => '省',
'city_id' => '市',
'district_id' => '区'
]);
$form->distpicker(['province_id', 'city_id', 'district_id'], '请选择区域');
$form->distpicker(['province_id', 'city_id', 'district_id'])->autoselect(1);
$filter->distpicker('province_id', 'city_id', 'district_id', '地域选择');
bash
php artisan vendor:publish --tag=laravel-admin-china-distpicker