Download the PHP package vernsg/nusa-filament without Composer
On this page you can find all versions of the php package vernsg/nusa-filament. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vernsg/nusa-filament
More information about vernsg/nusa-filament
Files in vernsg/nusa-filament
Package nusa-filament
Short Description Ready-to-use Filament 4 components for creasi/laravel-nusa Indonesian administrative regions.
License MIT
Homepage https://github.com/vernsg/nusa-filament
Informations about the package nusa-filament
Nusa Filament
Nusa Filament provides Filament 4 components for working with Indonesian administrative regions in Laravel applications. It is powered by creasi/laravel-nusa, which supplies the underlying region data and lookup support.
Use this package to add cascading Provinsi -> Kabupaten/Kota -> Kecamatan -> Desa/Kelurahan selects to Filament forms. It also includes postal code autofill, table columns, filters, infolist entries, and validation rules for applications that store Indonesian address data.
Preview
Child regions are displayed as soon as a parent region is selected. Remote search remains available for filtering larger option lists.
Features
- Form components: cascading province, regency, district, and village selects, available individually or as a complete address group with sensible default field names.
- Dependent options: child regions are loaded immediately after their parent region is selected, with remote search for larger option lists.
- Postal code autofill: the postal code field can be filled automatically from the selected village.
- Display components: table columns and infolist entries resolve stored region codes to readable names.
- Table filtering: a dependent location filter supports province, regency, district, and village fields.
- Validation: Laravel validation rules check individual region codes and address hierarchy consistency.
- Configuration: field names, labels, search limit, native select behavior, and dropdown position can be customized.
Version Compatibility
| Package Version | Filament | Laravel | PHP |
|---|---|---|---|
^2.0 (main) |
^4.0 |
^11.0 \| ^12.0 |
^8.2 |
^1.0 (1.x) |
^3.0 |
^10.0 \| ^11.0 \| ^12.0 |
^8.1 \| ^8.2 \| ^8.3 |
The PHP sqlite3 extension is also required. Laravel Nusa stores its administrative region dataset in SQLite, so the extension must be enabled in the application that installs this package.
Installation
Filament v4 (Latest)
Filament v3
Laravel package auto-discovery registers the service provider automatically.
Publish the configuration file if you need to customize field names, labels, the search limit, native select behavior, or dropdown position:
The published configuration file will be available at:
Usage
Quick Start
Add NusaAddress to a Filament resource form to render a complete Indonesian address block.
The component renders these fields:
By default, values are stored in these model attributes:
Ensure that your model table contains matching nullable columns before saving the form.
Database Columns
The package stores administrative region codes, not region names. Use the provided table columns and infolist entries to display readable region names.
Example migration:
Dependent Select Behavior
The address selects are reactive and dependent by default:
- Selecting a province loads its regencies.
- Selecting a regency loads its districts.
- Selecting a district loads its villages.
- Selecting a village can automatically fill the postal code field.
Options are available immediately after a parent region is selected. For example, after selecting a province, the regency dropdown displays the matching regencies without requiring the user to type first.
Remote search remains enabled for filtering larger option lists.
Naming Convention
The package uses English names in its PHP API while displaying Indonesian labels by default:
| Indonesian Label | Component / API Term |
|---|---|
| Provinsi | Province |
| Kabupaten/Kota | Regency |
| Kecamatan | District |
| Desa/Kelurahan | Village |
Form Components
Full Address Group
Customize field names when your model uses different columns:
Hide optional fields:
Individual Selects
Use the individual components to place fields manually:
Table Components
Display readable region names from stored codes:
Add a dependent location filter:
Customize filter field names:
Infolist Components
Display a complete address entry:
Or display individual entries:
Validation
Use the provided rules to validate individual region codes and confirm that the selected address hierarchy is consistent:
addressHierarchy() validates that:
- the regency belongs to the selected province;
- the district belongs to the selected regency;
- the village belongs to the selected district.
Configuration
Publish the configuration file:
Available options:
select_position defaults to bottom so region dropdowns do not flip upward and cover previous fields on long forms. Set it to null to use Filament's default auto-placement behavior.
Relationship to Laravel Nusa
This package does not replace Laravel Nusa. It uses creasi/laravel-nusa as its data and region lookup layer, then adds Filament-specific components around it.
It can be used as:
- a ready-to-install Filament integration for Laravel applications;
- a concrete example of how Laravel Nusa can power admin panel address forms;
- a small reference implementation for dependent Indonesian region selects.
Development
Install dependencies:
Run the test suite:
Run static analysis:
Check code style:
Fix code style:
Changelog
Please see CHANGELOG.md for notable changes.
Contributing
Please see CONTRIBUTING.md for contribution guidelines.
Security
Please see SECURITY.md for the security policy.
Credits
creasi/laravel-nusafor the Indonesian administrative region data and underlying region support.- Filament for the application panel and component framework.
License
The MIT License. Please see LICENSE.md for details.
All versions of nusa-filament with dependencies
creasi/laravel-nusa Version ^0.1.18
filament/forms Version ^4.0
filament/infolists Version ^4.0
filament/tables Version ^4.0
illuminate/contracts Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/support Version ^11.0|^12.0
spatie/laravel-package-tools Version ^1.16