From ab51c6f5d856c10f1a9a28b3bdfa1fdd9ce7b97b Mon Sep 17 00:00:00 2001 From: "fauzgabriel@gmail.com" Date: Thu, 23 Apr 2026 14:56:31 +0700 Subject: [PATCH] ok --- app/Http/Controllers/Api/ProfileController.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.php index 3c45c4a..91952d5 100644 --- a/app/Http/Controllers/Api/ProfileController.php +++ b/app/Http/Controllers/Api/ProfileController.php @@ -135,13 +135,8 @@ class ProfileController extends Controller $user = Auth::user(); $profile = $user->profile; - dd(["User Role => ", $user->role, "Profile ID => ", $profile->id, "Requested ID => ", $id]); - if($user->role === 'petani') { - dd(["Petani dengan profile id => ", $profile->id]); - }else{ - dd(["Fasilitator dengan profile id => ", $id]); - } - $profileId = ($user->role == 'petani') ? $profile->id : $id; + + $profileId = ($user->role->value === 'petani') ? $profile->id : $id; $profile = Profile::with('desaKelurahan') ->where('id', $profileId)->firstOrFail();