Update Model, dashboard, lahan
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user