Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing typo in readme.md #108

Merged
merged 1 commit into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[![StyleCI](https://github.styleci.io/repos/63410706/shield?branch=master)](https://github.styleci.io/repos/63410706)
[![Build Status](https://travis-ci.org/laravolt/indonesia.svg?branch=master)](https://travis-ci.org/laravolt/indonesia)
[![Coverage Status](https://coveralls.io/repos/github/laravolt/indonesia/badge.svg?branch=master)](https://coveralls.io/github/laravolt/indonesia?branch=master)

# LARAVOLT INDONESIA

Package Laravel yang berisi data Provinsi, Kabupaten/Kota, dan Kecamatan/Desa di seluruh Indonesia.
Expand All @@ -9,6 +10,7 @@ Data wilayah diambil dari [edwardsamuel/Wilayah-Administratif-Indonesia](https:/
## Instalasi

### Install Package Via Composer

```
composer require laravolt/indonesia
```
Expand Down Expand Up @@ -36,13 +38,16 @@ Tambahkan Service Provider dan Facade pada `config.app`
```

### Daftarkan Service Provider dan Facade untuk Lumen

Dalam file `bootstrap/app.php`, uncomment baris berikut

```php
$app->withFacades();
$app->withEloquent();
```

Dalam file `bootstrap/app.php`, daftarkan service provider dan alias/facade dengan menambahkan kode berokut.
Dalam file `bootstrap/app.php`, daftarkan service provider dan alias/facade dengan menambahkan kode berikut.

```php
$app->register(Laravolt\Indonesia\ServiceProvider::class);

Expand All @@ -52,6 +57,7 @@ class_alias(Laravolt\Indonesia\Facade::class, 'Indonesia');
```

Untuk mengatur prefix tabel, buat file `config/laravolt.php`, lalu copy kode berikut (ganti `indonesia_` dengan nilai prefix tabel yang diinginkan),

```php
<?php

Expand All @@ -61,7 +67,9 @@ return [
],
];
```

Lalu daftarkan konfigurasi dalam `bootstrap/app.php` dengan menambahkan kode berikut.

```php
$app->configure('laravolt');
```
Expand All @@ -72,22 +80,27 @@ Untuk selanjutnya, konfigurasi bisa dipanggil dengan cara `config('laravolt.indo

Jika Anda menggunakan Laravel/Lumen versi 5.3 ke atas, abaikan langkah di bawah ini.
Untuk Laravel:

```php
php artisan vendor:publish --provider="Laravolt\Indonesia\ServiceProvider"
```

Untuk Lumen, file migrations harus di-copy manual dari direktori `vendor/laravolt/indonesia/database/migrations` atau [Migrations](database/migrations/)

### Jalankan Migration

```php
php artisan migrate
```

### Jalankan Seeder Untuk Mengisi Data Wilayah

```php
php artisan laravolt:indonesia:seed
```

### Untuk menambahkan seedernya ke file `DatabaseSeeder.php` ikuti contoh berikut:

```php
namespace Database\Seeders;

Expand Down