From 90f13438db69aab61c4c2b88017e3992f430d12a Mon Sep 17 00:00:00 2001 From: ahmadafriadi Date: Thu, 2 Jul 2026 12:46:04 +0700 Subject: [PATCH] Update Model Profile --- app/Models/Profile.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Models/Profile.php b/app/Models/Profile.php index 2752038..c72fb09 100644 --- a/app/Models/Profile.php +++ b/app/Models/Profile.php @@ -7,6 +7,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; use App\Models\User; use App\Models\Wilayah\DesaKelurahan; +use App\Models\Pertanian\Lahan; class Profile extends Model { @@ -43,4 +44,9 @@ class Profile extends Model { return $this->belongsTo(User::class, 'user_id'); } + + public function lahan() + { + return $this->hasMany(Lahan::class, 'profile_id'); + } }