@@ -29,10 +29,16 @@ class ProfileController extends Controller
|
||||
|
||||
$user = Auth::user();
|
||||
$profile = $user->profile;
|
||||
$profileId = $user->role === 'petani' ? $profile->id : $request->id;
|
||||
$requestID = null;
|
||||
if($request->has('id')) {
|
||||
$requestID = $request->id;
|
||||
}
|
||||
|
||||
$profileId = $user->role === 'petani' ? $profile->id : $$requestID;
|
||||
|
||||
$desaKelurahanId = null;
|
||||
if ($profile->role === 'fasilitator') {
|
||||
if ($profile->role === 'fasilitator' || $profile->role === 'super_admin') {
|
||||
$desaKelurahanId = $request->desa_kelurahan_id;
|
||||
$desaKelurahanId = $profile->desa_kelurahan_id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user