Download the PHP package gp10devhts/ug-village-locations without Composer
On this page you can find all versions of the php package gp10devhts/ug-village-locations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gp10devhts/ug-village-locations
More information about gp10devhts/ug-village-locations
Files in gp10devhts/ug-village-locations
Package ug-village-locations
Short Description village locations package for uganda
License MIT
Homepage https://github.com/gp10devhts/ug-village-locations
Informations about the package ug-village-locations
Uganda Administrative Hierarchy Package
A production-ready Laravel package that provides Uganda administrative locations from District → County → Sub County → Parish → Village.
Features
- Full administrative hierarchy: Districts, Counties, Sub-Counties, Parishes, and Villages.
- Fast seeding via SQL dumps (offline support).
- Configurable hierarchy depth.
- Eloquent models and relationships.
- Name-based searching scopes.
- Maintainer tools for data collection from remote sources.
- Optional UUID support.
Installation
You can install the package via composer:
Publish the config and migrations:
Run the migrations:
Seed the locations:
Configuration
You can customize the package via config/ug-village-locations.php:
Usage
Eloquent Models
Demo Project
A demo Laravel project is available at github.com/GP10DevHTS/ug-locations-demo.
Notices:
- the project uses a custom District model to add regions.
- the model extention migrations use the default table names from the package.
Model Extensibility
You can override the default models by updating the models array in the config file. This allows you to add custom relationships, scopes, or traits.
Your custom model should extend the package's base model:
Artisan Commands
php artisan ug-locations:seed: Seed the database from local SQL dumps.php artisan ug-locations:truncate: Wipe all administrative location data.php artisan ug-locations:fetch: (Maintainer only) Fetch fresh data from remote source.php artisan ug-locations:build-dump: (Maintainer only) Generate SQL dumps from fetched data.
Testing
License
The MIT License (MIT). Please see License File for more information.
All versions of ug-village-locations with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0||^12.0||^13.0