30 lines
544 B
PHP
30 lines
544 B
PHP
<?php
|
|
|
|
namespace App\Models\Wilayah;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use App\Models\Wilayah\KabupatenKota;
|
|
|
|
class Provinsi extends Model
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'master_provinsi';
|
|
|
|
protected $fillable = [
|
|
'kode',
|
|
'nama',
|
|
'path',
|
|
'iso',
|
|
'created_by',
|
|
'updated_by',
|
|
'deleted_by',
|
|
];
|
|
|
|
public function kabupatenKota()
|
|
{
|
|
return $this->hasMany(KabupatenKota::class, 'provinsi_id');
|
|
}
|
|
}
|