Download the PHP package dev1191/filament-nepali-address without Composer

On this page you can find all versions of the php package dev1191/filament-nepali-address. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-nepali-address

Filament Nepali Address

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A comprehensive, production-ready Nepali address plugin for Filament (v4 and v5).

Provides cascading form selects, smart searchable table columns, cascading table filters, infolist entries, and relationship validation rules for Nepal's administrative divisions: 7 Provinces, 77 Districts, and 753 Local Bodies (Municipalities & Rural Municipalities).


Features


Requirements


Installation

Install the package via Composer:

Optionally publish the configuration file:

Optionally publish the translation files (English and Nepali):


Recommended Database Schema

You can easily add all necessary columns using the built-in nepaliAddress() Blueprint macro in your Laravel migrations:

To drop the address columns in rollback migrations:


Model Setup (User Model)

Add the HasNepaliAddress trait and include the address columns in your Eloquent model (e.g. App\Models\User):


Usage

1. Form Component (NepaliAddressSelects)

Add cascading address selects into your Filament Form:

Multi-Address Support (Custom Prefixes)

If your model stores multiple addresses (e.g., billing_ and shipping_), pass the prefix to make():

This will automatically bind to:

Including Ward & Postal Code

You can also customize the ward input into a select dropdown:

Individual Field Customizations & Requirements

Territory Restrictions (Restricting Specific Provinces / Districts)

If your business or delivery coverage only serves specific regions (e.g. Kathmandu Valley or Bagmati Province only):

Standalone Field Selects

If you prefer building each field individually rather than using the grouped component:


2. Table Column (NepaliAddressColumn)

Display formatted address strings in your Filament Table:

Single-Level Table Columns

How Smart Search Works

When a user searches "Kathmandu" or "काठमाडौं", the column looks up the matching IDs in-memory and transforms the query into indexed integer constraints:

This avoids slow string matching and full-table scans.


3. Table Filter (NepaliAddressFilter)

Add a cascading address filter to your Filament Table:

Single-Level Table Filters


4. Infolist Entry (NepaliAddressEntry)

Display addresses in read-only Filament Infolists:


5. Eloquent Model Trait (HasNepaliAddress)

With the HasNepaliAddress trait added to your model (such as User or Customer), you get instant accessors, formatted address strings, and powerful query scopes:

Dynamic Model Accessors

The trait provides convenient Eloquent attribute accessors that automatically resolve administrative IDs into human-readable names based on the active locale:

Helper Methods & Multi-Address Prefix Support

When your model stores multiple addresses (e.g. billing_ and shipping_), or when you need custom separators or to exclude ward numbers, call the helper methods directly:

Eloquent Query Scopes

Filter records by province, district, local body, ward, or search terms. All query scopes accept an optional $prefix argument for multi-address models:

[!TIP] How whereNepaliAddress() works: It translates your search text into matching local body, district, and province IDs in-memory and queries the database using indexed integer whereIn(...) statements. If no locations match, it safely produces an empty result (1 = 0) without full-table scans.


6. Standalone Address Helper (AddressData)

You can access the static address helper anywhere in your application:


Localization (English & नेपाली)

The package automatically adapts to your application's active locale (app()->getLocale()).

To force a specific language for address names, publish config/nepali-address.php and set:

When set to 'ne', administrative units and labels render natively:


Data Source & Limitations

This plugin utilizes administrative data from khanaldpk/nepali-address:


Testing

Run code styling check:

Run static analysis:


Changelog

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


Contributing

Please see CONTRIBUTING for details.


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.


All versions of filament-nepali-address with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^4.0|^5.0
khanaldpk/nepali-address Version ^1.0
spatie/laravel-package-tools Version ^1.15.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dev1191/filament-nepali-address contains the following files

Loading the files please wait ...