convert profile id
This commit is contained in:
@@ -87,6 +87,9 @@ class LahanController extends Controller
|
||||
if (!$profile) {
|
||||
abort(404, 'Profile tidak ditemukan');
|
||||
}
|
||||
if ($request->has('profile_id')) {
|
||||
$request->merge(['profile_id' => (int) $request->profile_id]);
|
||||
}
|
||||
|
||||
$profileRule = $user->role === 'fasilitator' ? ['required', 'numeric', 'exists:profiles,id'] : ['nullable'];
|
||||
|
||||
@@ -97,6 +100,7 @@ class LahanController extends Controller
|
||||
'path' => ['nullable', 'array'],
|
||||
'path.*' => ['array'],
|
||||
'luas_lahan' => ['nullable', 'numeric'],
|
||||
'uid' => ['required', 'string'],
|
||||
'profile_id' => $profileRule,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user