Update Lahan CPCL
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Ekosistem;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use App\Models\Wilayah\DesaKelurahan;
|
||||
use Enums\StatusLahan;
|
||||
|
||||
class LahanCPCL extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
|
||||
protected $table = 'ekosistem_lahan_cpcl';
|
||||
|
||||
protected $casts = [
|
||||
'status_kepemilikan' => \App\Enums\StatusLahan::class,
|
||||
'path' => 'array',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'nama',
|
||||
'status_kepemilikan',
|
||||
'nama_pemilik',
|
||||
'desa_kelurahan_id',
|
||||
'path',
|
||||
'luas_lahan',
|
||||
'created_by',
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
public function desaKelurahan()
|
||||
{
|
||||
return $this->belongsTo(DesaKelurahan::class, 'desa_kelurahan_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user