dcat laravel-admin extension for china distpicker

Overview

dcat-admin extension

Distpicker是一个中国省市区三级联动选择组件,这个包是基于Distpickerdcat-admin扩展,用来将Distpicker集成进dcat-admin的表单中.

此扩展参考与引用:

截图

1、安装

composer require sparkinzy/dcat-distpicker

2、Dcat 后台发布资源

install

3、dcat-distpicker 使用方式

code

4、呈现效果

image-usage

表单中使用

比如在表中有三个字段province_name, city_name, district_name, 在form表单中使用它:

$form->distpicker(['province_name', 'city_name', 'district_name']);

设置默认值

$form->distpicker([
    'province_name' => '省份',
    'city_name' => '市',
    'district_name' => '区'
], '地域选择')->default([
    'province' => '黑龙江省',
    'city'     => 双鸭山市,
    'district' => 四方台区,
]);

设置返回值类型

默认 name,可修改返回类型为code,但目前不推荐


$form->distpicker([
    'province_name' => '省份',
    'city_name' => '市',
    'district_name' => '区'
], '地域选择')->type('code');

可以设置每个字段的placeholder

$form->distpicker([
    'province_name' => '省',
    'city_name'     => '市',
    'district_name' => '区'
]);

设置label

$form->distpicker(['province_name', 'city_name', 'district_name'], '请选择区域');

设置自动选择, 可以设置1,2,3 表示自动选择到第几级

$form->distpicker(['province_name', 'city_name', 'district_name'])->autoselect(1);

启用select2进行渲染

$form->distpicker(['province_name', 'city_name', 'district_name']))->select2();

表格筛选中使用

$filter->distpicker('province_name', 'city_name', 'district_name', '地域选择');

地区编码数据

Distpicker所使用的地域编码是基于国家统计局发布的数据, 数据字典为china_area.sql文件.

Todo

  • 可以自定义是否返回code或者name
  • Grid filter扩展
You might also like...
Is an Extension of Laravel View Class which compiles String Template on the fly. It automatically detects changes on your string template and recompiles it if needed.

Laravel-fly-view Is an Extension of Laravel View Class which compiles String Template on the fly. It automatically detects changes on your string temp

Simple project to send bulk comma-separated emails using laravel and messenger module from quick admin panel generator.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Voyager - The Missing Laravel Admin
Voyager - The Missing Laravel Admin

Voyager - The Missing Laravel Admin Made with ❤️ by The Control Group Website & Documentation: https://voyager.devdojo.com/ Video Tutorial Here: https

Fully customizable and tests supported Laravel admin dashboard for developers.

Laravel Admin dashboard Like Laravel Jetstream but built with Hotwire Turbo + additional perks. Tools used: tailwindcomponents/dashboard Hotwire Turbo

👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.
👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.

👻 It's never been easier to build and customize admin panels. Yah! yaldash is a beautifully designed administration panel for Laravel.

Chrome extension to generate Laravel integration tests while using your app.

Laravel TestTools Check out the introduction post about the chrome extension. Installation git clone [email protected]:mpociot/laravel-testtools.git # i

CoreUI Free Laravel Bootstrap Admin Template
CoreUI Free Laravel Bootstrap Admin Template

CoreUI Free Laravel Bootstrap Admin Template Curious why I decided to create CoreUI? Please read this article: Jack of all trades, master of none. Why

Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5
Free and open-source Laravel admin dashboard interface built with Livewire & Alpine.js based on Bootstrap 5

Volt Dashboard Laravel Free Frontend Web App for Laravel with Livewire & Alpine.js Never start a development project from scratch again. We've partner

Customize Login and Register Page for User/Admin in Laravel v8

Customize Login and Register Page for User/Admin in Laravel v8

Releases(1.1.0)
Owner
mu
mu
Laravel router extension to easily use Laravel's paginator without the query string

?? THIS PACKAGE HAS BEEN ABANDONED ?? We don't use this package anymore in our own projects and cannot justify the time needed to maintain it anymore.

Spatie 307 Sep 23, 2022
Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

WebDevEtc. 227 Dec 25, 2022
An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel, Bootstrap, and Vue.js

Laravel Soundboard An open source Laravel Soundboard with Admin Panel CRUD (Create Read Update Delete) built on Laravel 5.8, Bootstrap 4, Vue.js, Boot

Jeremy Kenedy 24 Oct 28, 2022
Specially customized Laravel jetstream's scaffolding for Frest html + laravel admin Template

frest-html-laravel-jetstream Specially customized Laravel jetstream's scaffolding for Frest html + laravel admin Template. It'll not work with any oth

PIXINVENT CREATIVE STUDIO 0 Apr 5, 2022
Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable.

Laravel Ajax Datatable is a nice laravel admin panel which includes authentication, CRUD and Ajax datatable. the datatable is created with laravel & ajax so No need to install another package, yout can do search, sort, paginate and show records per page fastly.

Jumah 3 Oct 3, 2022
Easy-to-install Admin Panel for Laravel

CSS Framework: https://0notole.github.io/elements.css/ Install project: composer create-project --prefer-dist laravel/laravel screen, cd screen Add re

Anatoly Silko 3 Aug 25, 2021
Laravel Mysql Spatial Builder Extension

magutti-spatial V2 Laravel Builder Mysql Spatial Extension Laravel Builder extensions to calculate distances between two Spatial points using Mysql na

Marco Asperti 4 Oct 2, 2022
Generate form validators for Laravel: an extension of way/generators

Laravel Form Validator Contents Introduction Installation Usage Example Tests Introduction After using Jeffrey Way's Generator and his Validator packa

John Evans 6 Jan 14, 2022
Laravel Seo package for Content writer/admin/web master who do not know programming but want to edit/update SEO tags from dashboard

Laravel Seo Tools Laravel is becoming more and more popular and lots of web application are developing. In most of the web application there need some

Tuhin Bepari 130 Dec 23, 2022
Laravel package for giving admin-created accounts to users via 'set-password' email.

Invytr When making a website where users are created instead of registering themselves, you are faced with the challenge of safely giving users the ac

GlaivePro 64 Jul 17, 2022