25 lines
485 B
PHP
25 lines
485 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Kecamatan extends Model
|
|
{
|
|
protected $table = 'Kecamatan';
|
|
protected $primaryKey = 'KecamatanId';
|
|
public $incrementing = false;
|
|
protected $keyType = 'string';
|
|
|
|
protected $fillable = [
|
|
'KecamatanId',
|
|
'KabupatenId',
|
|
'NamaKecamatan'
|
|
];
|
|
|
|
public function kabupaten()
|
|
{
|
|
return $this->belongsTo(Kabupaten::class, 'KabupatenId', 'KabupatenId');
|
|
}
|
|
}
|