From 36f5a0d580b4bf92c5d0ec7e374a1ed63e239d87 Mon Sep 17 00:00:00 2001 From: "fauzgabriel@gmail.com" Date: Wed, 22 Apr 2026 14:33:30 +0700 Subject: [PATCH] profile by id --- app/Http/Controllers/Api/ProfileController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/ProfileController.php b/app/Http/Controllers/Api/ProfileController.php index a5ef02a..cf98450 100644 --- a/app/Http/Controllers/Api/ProfileController.php +++ b/app/Http/Controllers/Api/ProfileController.php @@ -138,8 +138,8 @@ class ProfileController extends Controller $profileId = $user->role === 'petani' ? $profile->id : $id; $profile = Profile::with('desaKelurahan') - ->when($profileId, fn($q,$v) => $q->where('id',$v)) - ->where('user_id', Auth::id())->first(); + ->when($profileId, fn($q,$v) => $q->where('id',$v))->first(); + // ->where('user_id', Auth::id())->first(); return response()->json(new ProfileResource($profile)); }