Skip to content

Lists of district & villages in Mizoram State

License

Notifications You must be signed in to change notification settings

valpuia604/mizoram-khua

Repository files navigation

Lists of district & villages in Mizoram State

Latest Version on Packagist GitHub Code Style Action Status Total Downloads

Hei hi Mizoram a mi ten kan district leh villages (khua) te awlsam tak a kan neih theih nan, manual entry ngailo in.

Installation

You can install the package via composer:

composer require valpuia/mizoram-khua

php artisan mizoram-khua:install

Install hian migrations file a published nghal a chuan migrate run nghal turin a rawn zawt ang che.

A hnuai a command hmang hian engtik lai pawhin migration file i publish thei ang:

php artisan vendor:publish --tag="mizoram-khua-migrations"
php artisan migrate

Running seeder

A hnuai a command hmang hian district leh village te database-ah a in dahlut ang.

php artisan mizoram-khua:seed

Usage

Models atan MizoramDistrict leh MizoramVillage hman ani, a hnuaiah detail in

// \App\Models\MizoramDistrict.php
class MizoramDistrict extends Model
{
    protected $guarded = [];

    public function mizoramVillages(): HasMany
    {
        return $this->hasMany(MizoramVillage::class);
    }
}

// \App\Models\MizoramVillage.php
class MizoramVillage extends Model
{
    protected $guarded = [];

    public function mizoramDistrict(): BelongsTo
    {
        return $this->belongsTo(MizoramDistrict::class);
    }
}

Awlsam takin a hnuai a mi ang hian i hmang thei nghal ang

use Valpuia\MizoramKhua\Models\MizoramDistrict;
use Valpuia\MizoramKhua\Models\MizoramVillage;

MizoramVillage::with('mizoramDistrict')
    // ->where('mizoram_district_id', 1)
    // ->where('name', 'Aibawk')
    ->get();

MizoramDistrict::with('mizoramVillages')
    ->where('name', 'Aizawl')
    ->get();

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.

About

Lists of district & villages in Mizoram State

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages