PHPackages                             matriphe/laraciproid - 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. [Database &amp; ORM](/categories/database)
4. /
5. matriphe/laraciproid

ActiveLibrary[Database &amp; ORM](/categories/database)

matriphe/laraciproid
====================

Indonesia city and province data migration and seeder for Laravel.

1.4(8y ago)232.5k16MITPHP

Since Sep 28Pushed 8y agoCompare

[ Source](https://github.com/matriphe/laraciproid)[ Packagist](https://packagist.org/packages/matriphe/laraciproid)[ RSS](/packages/matriphe-laraciproid/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (2)Versions (6)Used By (0)

Laraciproid
===========

[](#laraciproid)

Laravel City Province ID
------------------------

[](#laravel-city-province-id)

Indonesia city and province data migration and seeder for Laravel 5.x.

### Installation

[](#installation)

Using composer, run this command from your Laravel's project root directory:

```
composer require matriphe/laraciproid:~1.0
```

### Configuration

[](#configuration)

#### Laravel 5.5

[](#laravel-55)

Nothing to do. Laraciproid will be loaded automatically.

#### Laravel 5.1, 5.2, 5.3, and 5.4

[](#laravel-51-52-53-and-54)

Open `config/app.php` and add this line on autoloaded service providers section.

```
'providers' => [
	...
	Matriphe\Laraciproid\ServiceProvider::class,
	...
],
```

#### Laravel 5.0

[](#laravel-50)

Open `config/app.php` and add this line on autoloaded service providers section.

```
'providers' => [
        ...
        'Matriphe\Laraciproid\ServiceProvider',
        ...
],
```

### Publish Vendor

[](#publish-vendor)

```
php artisan vendor:publish
```

Or if you want to more specific, and want to force the vendor publishing.

```
php artisan vendor:publish --provider="Matriphe\Laraciproid\ServiceProvider" --force
```

This command will add these files to your project:

- `config/laraciproid.php`, the configuration file containing tables name.
- `database/migrations/2015_09_28_175100_create_city_province_tables`, the migration file.
- `database/sql/city.sql`, SQL file for city seed.
- `database/sql/province.sql`, SQL file for province seed.
- `database/json/cities.json`, JSON file for cities seed.
- `database/json/provinces.json`, JSON file for provinces seed.
- `database/seeds/LaraciproidSeeder.php`, table seeder file, read the SQL data.
- `app/Models/City.php`, city model file.
- `app/Models/Province.php`, province model file.

### Run Migration

[](#run-migration)

```
php artisan migrate
```

### Run Database Seeder

[](#run-database-seeder)

```
php artisan db:seed --class=LaraciproidSeeder
```

You can add this file to your `database/seeds/DatabaseSeeder.php` to make it auto loaded on seeding command.

```
public function run()
{
    Model::unguard();

    $this->call('LaraciproidSeeder');
}
```

### Relationship

[](#relationship)

Province table has one to many relationship of City table.

```
// Get all cities under DI Yogyakarta (province_id = 34)
$cities = App\Models\Province::find(34)->cities;

foreach ($cities as $city) {
    // Do something
}

// Get province name of Bogor (city_id = 3271)
$city = App\Models\City::find(3271);
$province_name = $city->province->province_name;
```

### License

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 96.9% 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 ~177 days

Total

5

Last Release

3223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/809de97d088b0eff358f96141a31bd8897216a03175448192de140f2723bdea6?d=identicon)[matriphe](/maintainers/matriphe)

---

Top Contributors

[![matriphe](https://avatars.githubusercontent.com/u/277262?v=4)](https://github.com/matriphe "matriphe (31 commits)")[![mascang](https://avatars.githubusercontent.com/u/9129759?v=4)](https://github.com/mascang "mascang (1 commits)")

---

Tags

cityhacktoberfestindonesialaravelprovinceseederlaraveldatacityseederidprovinceindonesiaina

### Embed Badge

![Health badge](/badges/matriphe-laraciproid/health.svg)

```
[![Health](https://phpackages.com/badges/matriphe-laraciproid/health.svg)](https://phpackages.com/packages/matriphe-laraciproid)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M633](/packages/spatie-laravel-medialibrary)[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k8.4M96](/packages/mongodb-laravel-mongodb)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M25](/packages/yajra-laravel-oci8)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k32.6M46](/packages/kirschbaum-development-eloquent-power-joins)[glushkovds/phpclickhouse-laravel

Adapter of the most popular library https://github.com/smi2/phpClickHouse to Laravel

2051.5M2](/packages/glushkovds-phpclickhouse-laravel)

PHPackages © 2026

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