PHPackages                             erendi/location - 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. erendi/location

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

erendi/location
===============

Libari untuk lokasi provinsi, kab/kota, kecamatan, dan desa

1.0.0(4y ago)113MITPHPPHP ^7.3|^8.0

Since Dec 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bimacoding/location)[ Packagist](https://packagist.org/packages/erendi/location)[ RSS](/packages/erendi-location/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

erendi-location
===============

[](#erendi-location)

Location packages for province, citites, district, and subdistrict indonesian support laravel 8

### screenshoot

[](#screenshoot)

[![Screenshoot](https://raw.githubusercontent.com/bimacoding/location/master/Capture.PNG)](https://raw.githubusercontent.com/bimacoding/location/master/Capture.PNG)

### Installation

[](#installation)

1. Install dengan composer

```
composer require erendi/location
```

2. Tambahkan kelas berikut, ke array "providers" di file config/app.php

```
Erendi\Location\LocationServiceProvider::class,
```

3. Tambahkan facades di file config/app.php "aliase"

```
'Lokasi' => Erendi\Location\Facades\Location::class,
```

4. Publish packages

```
php artisan vendor:publish --provider="Erendi\Location\LocationServiceProvider"
```

5. Lakukan migration data

```
php artisan migrate
```

### Penggunaan

[](#penggunaan)

1. pada halaman view create/add/atau tambah

```
@extends('layouts.template')
@section('content')
    {!! Lokasi::render() !!}
    @once
        @push('ext_css')
            {!! Lokasi::css() !!}
        @endpush
        @push('ext_scripts')
            {!! Lokasi::scripts() !!}

        @endpush
    @endonce
@endsection
```

2. Pada halaman view edit atau ubah

```
@extends('layouts.template')
@section('content')
    {!! Lokasi::render() !!}
    @once
        @push('ext_css')
            {!! Lokasi::css() !!}
        @endpush
        @push('ext_scripts')
            {!! Lokasi::scriptsedit() !!}

        @endpush
    @endonce
@endsection
```

### Contoh Pimplemntasi langsung

[](#contoh-pimplemntasi-langsung)

- ini pada file "create.blade.php" yang saya punya

```
@extends('layouts.template')
@section('content')

                        {{ $title }}

                            @if (count($errors) > 0)

                                    Whoops! There were some problems with your input.

                                        @foreach ($errors->all() as $error)
                                            {{ $error }}
                                        @endforeach

                            @endif
                            {!! Form::open(['route' => 'users.store', 'method' => 'POST']) !!}

                                    /*---- code saya -----*/
                                    {!! Lokasi::render() !!}
                                    /*---- code saya -----*/

                            {!! Form::close() !!}

    @once
        @push('ext_css')
            {!! Lokasi::css() !!}
        @endpush
        @push('ext_scripts')
            {!! Lokasi::scripts() !!}
        @endpush
    @endonce
@endsection
```

- ini pada file edit.blade.php yang saya punya

```
@extends('layouts.template')
@section('content')

                        {{ $title }}

                            @if (count($errors) > 0)

                                    Whoops! There were some problems with your input.

                                        @foreach ($errors->all() as $error)
                                            {{ $error }}
                                        @endforeach

                            @endif
                            {!! Form::model($user, ['method' => 'PATCH', 'route' => ['users.update', $user->id]]) !!}

                                    {!! Lokasi::render($addloc->getRawOriginal()) !!}

                            {!! Form::close() !!}

    @once
        @push('ext_css')
            {!! Lokasi::css() !!}
        @endpush
        @push('ext_scripts')
            {!! Lokasi::scriptsedit($addloc->getRawOriginal()) !!}
        @endpush
    @endonce
@endsection
```

### Mengunakan Model Provinsi, Kota/Kabupate, Kecamatan, Desa

[](#mengunakan-model-provinsi-kotakabupate-kecamatan-desa)

Cara menggunaka model yang lokasi

```
// provinsi
use Erendi\Location\Models\Provinces;
// Kabupaten / Kota
use Erendi\Location\Models\Cities;
// Kecamatan
use Erendi\Location\Models\Districts;
// Desa
use Erendi\Location\Models\Subdistricts;
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Unknown

Total

1

Last Release

1607d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b156c8695cdca5806090f543f6d59128c24593175a033f905302985f98a0212?d=identicon)[bimacoding](/maintainers/bimacoding)

---

Top Contributors

[![bimacoding](https://avatars.githubusercontent.com/u/61307168?v=4)](https://github.com/bimacoding "bimacoding (13 commits)")

### Embed Badge

![Health badge](/badges/erendi-location/health.svg)

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

###  Alternatives

[parsilver/thailand-provinces-php

Thailand address database

121.5k1](/packages/parsilver-thailand-provinces-php)

PHPackages © 2026

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