Download the PHP package nurbekjummayev/laravel-region without Composer
On this page you can find all versions of the php package nurbekjummayev/laravel-region. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nurbekjummayev/laravel-region
More information about nurbekjummayev/laravel-region
Files in nurbekjummayev/laravel-region
Package laravel-region
Short Description Uzbekistan region and district (COATO) classifier for Laravel: migrations, seed data and Eloquent models with uz/oz/ru/en names
License MIT
Informations about the package laravel-region
Laravel Region
Uzbekistan region and district (COATO) classifier for Laravel: migrations, seed data, and Eloquent models.
14 regions · 209 districts · Laravel 13 · PHP 8.3+
Installation
| Publish Tag | Content | Destination |
|---|---|---|
region-config |
region.php |
config/ |
region-migrations |
migrations | database/migrations/ |
region-data |
regions.json |
database/data/region/ |
Columns
Regions Table
| Column | Type | Description |
|---|---|---|
id |
bigint |
Auto-increment |
country_code |
char(2) |
Default UZ |
code |
string(8) |
COATO code, unique |
tax_code |
string(8) |
Tax authority code, unique |
type |
string |
republic, region, city |
name_uz |
string |
Uzbek name (Latin) |
name_oz |
string |
Uzbek name (Cyrillic) |
name_ru |
string |
Russian name |
name_en |
string |
English name |
is_active |
boolean |
Active/inactive |
timestamps |
created_at, updated_at |
Districts Table
| Column | Type | Description |
|---|---|---|
id |
bigint |
Auto-increment |
region_id |
bigint |
Foreign key to regions |
region_code |
string(8) |
Denormalized COATO |
code |
string(16) |
COATO code, nullable, unique |
tax_code |
string(8) |
Tax code, nullable |
type |
string |
district, city |
name_uz, name_oz, name_ru, name_en |
string |
Translated names |
is_active |
boolean |
Active/inactive |
timestamps |
created_at, updated_at |
Usage
Finding District by Tax Code
District tax code is NOT globally unique — only unique within a region. Always search with region code:
Translation
JSON Response
name is automatically appended (#[Appends]):
Route Model Binding
Models bind to routes by code:
Inter-service Convention
Send
code(COATO), notid, to other services.
id is an internal auto-increment, different in each database.
code (COATO) is universal and immutable.
Data Notes
| Source | database/data/regions.json |
| Regions | 14 — code and tax_code globally unique |
| Districts | 209 — code globally unique |
| Region types | republic, region, city |
| District types | district, city |
⚠️ District tax_code |
NOT globally unique (23 duplicates). Composite unique(region_id, tax_code) applied |
| ⚠️ One district | Bo'z tumani (region 1703) has no code or tax_code in source. Both columns nullable. Seeder matches by (region_id, name_uz) |
districts.region_code is denormalized for fast lookup without joins.
Seeder is idempotent — safe to re-run.
Testing
License
MIT License. See LICENSE for details.
All versions of laravel-region with dependencies
ext-json Version *
illuminate/support Version ^13.0
illuminate/database Version ^13.0
illuminate/console Version ^13.0