ok
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user