update api
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Models\Map;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Tanaman extends Model
|
||||
{
|
||||
@@ -22,4 +23,17 @@ class Tanaman extends Model
|
||||
'updated_by',
|
||||
'deleted_by',
|
||||
];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'kondisi_tanaman' => \App\Enums\KondisiTanaman::class,
|
||||
];
|
||||
}
|
||||
|
||||
public function komoditas()
|
||||
{
|
||||
return $this->belongsTo(Komoditas::class, 'komoditas_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ class DesaKelurahan extends Model
|
||||
protected $table = 'master_desa_kelurahan';
|
||||
|
||||
protected $fillable = [
|
||||
'kode_desa_kelurahan',
|
||||
'nama_desa_kelurahan',
|
||||
'kode',
|
||||
'nama',
|
||||
'path',
|
||||
'kecamatan_id',
|
||||
];
|
||||
|
||||
@@ -12,8 +12,8 @@ class KabupatenKota extends Model
|
||||
protected $table = 'master_kabupaten_kota';
|
||||
|
||||
protected $fillable = [
|
||||
'kode_kabupaten_kota',
|
||||
'nama_kabupaten_kota',
|
||||
'kode',
|
||||
'nama',
|
||||
'path',
|
||||
'provinsi_id',
|
||||
];
|
||||
|
||||
@@ -12,8 +12,8 @@ class Kecamatan extends Model
|
||||
protected $table = 'master_kecamatan';
|
||||
|
||||
protected $fillable = [
|
||||
'kode_kecamatan',
|
||||
'nama_kecamatan',
|
||||
'kode',
|
||||
'nama',
|
||||
'path',
|
||||
'kabupaten_kota_id',
|
||||
];
|
||||
|
||||
@@ -12,8 +12,8 @@ class Provinsi extends Model
|
||||
protected $table = 'master_provinsi';
|
||||
|
||||
protected $fillable = [
|
||||
'kode_provinsi',
|
||||
'nama_provinsi',
|
||||
'kode',
|
||||
'nama',
|
||||
'path',
|
||||
'iso',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user