dominasys/filament-location 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dominasys/filament-location

最新稳定版本:v5.1.1

Composer 安装命令:

composer require dominasys/filament-location

包简介

Filament package for address and location handling with smart lookup and dynamic selects

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads

filament-location provides reusable Filament components for address forms, postal code lookup, and country-aware location fields.

Features

  • PostalCode lookup with standardized results
  • Reusable components for state, city, neighborhood, street, house number, and complement
  • Frontend-only search for state and city
  • Accent-insensitive and typo-tolerant search
  • Canonical address dataset stored per country
  • Localization for en and pt_BR

Installation

Install the package with Composer:

composer require dominasys/filament-location

Usage

Use the provided components in your Filament form schemas:

use Dominasys\FilamentLocation\Forms\Components\Address\City;
use Dominasys\FilamentLocation\Forms\Components\Address\Complement;
use Dominasys\FilamentLocation\Forms\Components\Address\HouseNumber;
use Dominasys\FilamentLocation\Forms\Components\Address\Neighborhood;
use Dominasys\FilamentLocation\Forms\Components\Address\State;
use Dominasys\FilamentLocation\Forms\Components\Address\Street;
use Dominasys\FilamentLocation\Forms\Components\PostalCode;

PostalCode::make('postal_code');
State::make('state');
City::make('city');
Neighborhood::make('neighborhood');
Street::make('street');
HouseNumber::make('house_number');
Complement::make('complement');

Supported Countries

Today the package ships with support for Brazil (BR).

The address dataset is country-based, so additional countries can be added without changing the public component API.

Extending With New Countries

To add support for another country, follow the same pattern used for Brazil:

  1. Add a new address data source implementation for the country.
  2. Register the new source in the source factory.
  3. Generate the country dataset in the canonical JSON format used by the package.
  4. Add or update translations if the country needs localized messages.
  5. Add tests for lookup, state/city options, and dataset sync.

The package is intentionally structured so the UI components keep the same API even when the underlying data source changes.

Testing

Run the full local quality gate with:

composer check

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

If you want to add support for a new country, keep the implementation country-driven and avoid adding Brazil-specific assumptions to shared code.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 5
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固