Hei hi Mizoram a mi ten kan district leh villages (khua) te awlsam tak a kan neih theih nan, manual entry ngailo in.
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
A hnuai a command hmang hian district leh village te database-ah a in dahlut ang.
php artisan mizoram-khua:seed
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();
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.