program dan basis data ekosistem

This commit is contained in:
2026-04-20 16:05:27 +07:00
parent 0bbcb22d50
commit 4032eb6e75
49 changed files with 4384 additions and 155 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Models\Core;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Relations\HasMany;
use App\Models\Core\KomoditasProgram;
use App\Models\Core\LokasiProgram;
class Program extends Model
{
use SoftDeletes;
protected $table = 'core_program';
protected $fillable = [
"nama",
"sub_domain",
"tahun",
"instansi",
];
public function komoditas(): HasMany
{
return $this->hasMany(KomoditasProgram::class, 'program_id', 'id');
}
public function lokasi(): HasMany
{
return $this->hasMany(LokasiProgram::class, 'program_id', 'id');
}
}