sawirricardo/indonesia-region

This is my package indonesia-region

1.2.0 2023-02-15 02:35 UTC

README

Indonesia Region Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Use Indonesia Region data in your Laravel App.

Support us

Investing on Indonesia Region is defintely a good move from you. You can support by donating to my wallet

Installation

You can install the package via composer:

composer require sawirricardo/indonesia-region

You can publish and run the migrations with:

php artisan vendor:publish --tag="indonesia-region-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="indonesia-region-config"

This is the contents of the published config file:

return [
    'model' => \Sawirricardo\IndonesiaRegion\Models\IndonesiaRegion::class,
];

Usage

$provinces = \Sawirricardo\IndonesiaRegion\Models\IndonesiaRegion::query()->provinces()->get();
$cities = \Sawirricardo\IndonesiaRegion\Models\IndonesiaRegion::query()->cities()->where('parent_id',1)->get();
$districts = \Sawirricardo\IndonesiaRegion\Models\IndonesiaRegion::query()->districts()->where('parent_id',1)->get();

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.