PHPackages                             luiscamp/laravel-peru-ubigeo - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. luiscamp/laravel-peru-ubigeo

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

luiscamp/laravel-peru-ubigeo
============================

Peruvian ubigeo utilities for Laravel applications.

v1.1.0(1mo ago)034MITPHPPHP ^8.2

Since Mar 12Pushed 1mo agoCompare

[ Source](https://github.com/jorarmarfin/laravel-peru-ubigeo)[ Packagist](https://packagist.org/packages/luiscamp/laravel-peru-ubigeo)[ Docs](https://github.com/jorarmarfin/laravel-peru-ubigeo)[ RSS](/packages/luiscamp-laravel-peru-ubigeo/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (10)Versions (4)Used By (0)

laravel-peru-ubigeo
===================

[](#laravel-peru-ubigeo)

Base package to work with Peruvian ubigeo data in Laravel.

Installation
------------

[](#installation)

```
composer require luiscamp/laravel-peru-ubigeo
```

Quick start after install
-------------------------

[](#quick-start-after-install)

```
# 1) Publish migration
php artisan vendor:publish --tag=ubigeo-migrations

# 2) Run migrations
php artisan migrate

# 3) Publish seeder
php artisan vendor:publish --tag=ubigeo-seeders

# 4) Seed ubigeo data
php artisan db:seed --class="Database\\Seeders\\UbigeoSeeder"
```

Publish config
--------------

[](#publish-config)

```
php artisan vendor:publish --tag=ubigeo-config
```

Publish migrations
------------------

[](#publish-migrations)

```
php artisan vendor:publish --tag=ubigeo-migrations
php artisan migrate
```

Publish model + migration (single command)
------------------------------------------

[](#publish-model--migration-single-command)

```
php artisan ubigeo:publish
```

Options:

- `php artisan ubigeo:publish --model`
- `php artisan ubigeo:publish --migration`
- `php artisan ubigeo:publish --force`

Publish and run seeder
----------------------

[](#publish-and-run-seeder)

```
php artisan vendor:publish --tag=ubigeo-seeders
php artisan db:seed --class="Database\\Seeders\\UbigeoSeeder"
```

API endpoints
-------------

[](#api-endpoints)

By default the prefix is `ubigeo` and middleware is `api`.

```
GET /ubigeo/search?code=010000
GET /ubigeo/search?name=lima
GET /ubigeo/departments?name=ama
GET /ubigeo/provinces/010000?name=chacha
GET /ubigeo/districts/010100?name=asuncion
```

Rules:

- Department code: ends with `0000` (example `010000`).
- Province code: ends with `00` and excludes departments (example `010100`).
- District responses return `id` (not `code`).

Trait methods
-------------

[](#trait-methods)

```
use LaravelPeru\Ubigeo\Traits\InteractsWithUbigeo;

class UbigeoService
{
    use InteractsWithUbigeo;
}
```

Available methods:

- `getDepartament(?string $name = null)`
- `getProvice(string $code, ?string $name = null)`
- `getDistrict(string $code, ?string $name = null)`

Testing
-------

[](#testing)

```
composer test
```

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance89

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~49 days

Total

3

Last Release

54d ago

Major Versions

v0.1.2 → v1.1.02026-06-17

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3198f0d8e819dddaac96d4b56872c00981ca9821942f1e63db9bfae8135aec6?d=identicon)[luiscamp](/maintainers/luiscamp)

---

Top Contributors

[![jorarmarfin](https://avatars.githubusercontent.com/u/10103033?v=4)](https://github.com/jorarmarfin "jorarmarfin (6 commits)")

---

Tags

laravelperuubigeo

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luiscamp-laravel-peru-ubigeo/health.svg)

```
[![Health](https://phpackages.com/badges/luiscamp-laravel-peru-ubigeo/health.svg)](https://phpackages.com/packages/luiscamp-laravel-peru-ubigeo)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M158](/packages/laravel-cashier)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
