diff --git a/app/Models/City.php b/app/Models/City.php new file mode 100644 index 0000000..ca51087 --- /dev/null +++ b/app/Models/City.php @@ -0,0 +1,45 @@ + 'int', + 'status' => 'bool' + ]; + + protected $fillable = [ + 'province_id', + 'name', + 'status' + ]; + + public function province() + { + return $this->belongsTo(Province::class); + } +} diff --git a/app/Models/Province.php b/app/Models/Province.php new file mode 100644 index 0000000..5a24774 --- /dev/null +++ b/app/Models/Province.php @@ -0,0 +1,43 @@ + 'bool' + ]; + + protected $fillable = [ + 'name', + 'status' + ]; + + public function cities() + { + return $this->hasMany(City::class); + } +}