This commit is contained in:
2026-04-23 14:49:09 +07:00
parent 42c4f687ea
commit cf08e9828d
@@ -135,7 +135,7 @@ class ProfileController extends Controller
$user = Auth::user(); $user = Auth::user();
$profile = $user->profile; $profile = $user->profile;
$profileId = ($user->role === 'petani') ? $profile->id : $id; $profileId = ($user->role == 'petani') ? $profile->id : $id;
$profile = Profile::with('desaKelurahan') $profile = Profile::with('desaKelurahan')
->where('id', $profileId)->firstOrFail(); ->where('id', $profileId)->firstOrFail();