Update Model, dashboard, lahan

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-29 11:06:31 +07:00
co-authored by Copilot
parent 8bcb0e47e0
commit d18b0668e1
21 changed files with 1654 additions and 59 deletions
+4 -4
View File
@@ -37,22 +37,22 @@ class Lahan extends Model
'path' => 'array',
];
public function profile(): BelongsTo
public function profile()
{
return $this->belongsTo(Profile::class, 'profile_id');
}
public function desaKelurahan(): BelongsTo
public function desaKelurahan()
{
return $this->belongsTo(DesaKelurahan::class, 'desa_kelurahan_id');
}
public function adat(): BelongsTo
public function adat()
{
return $this->belongsTo(Adat::class, 'adat_pemilik_id');
}
public function tanaman(): HasMany
public function tanaman()
{
return $this->hasMany(Tanaman::class, 'lahan_id');
}
+3
View File
@@ -7,6 +7,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
use App\Models\Pertanian\Komoditas;
use App\Models\Pertanian\Lahan;
use App\Models\Profile;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Tanaman extends Model
{