Merge branch 'main' of https://git.probindo.com/Probindo/database-pertani-web
This commit is contained in:
@@ -118,11 +118,13 @@ class TanamanController extends Controller
|
||||
'latitude' => ['nullable', 'numeric', 'between:-90,90', 'required_with:longitude'],
|
||||
'longitude' => ['nullable', 'numeric', 'between:-180,180', 'required_with:latitude'],
|
||||
'kondisi_tanaman' => ['nullable', 'string', new Enum(KondisiTanaman::class)],
|
||||
'uid' => ['required', 'string'],
|
||||
]);
|
||||
|
||||
$tanaman = Tanaman::create([
|
||||
...$validated,
|
||||
'profile_id' => $profile->id,
|
||||
'uid' => $validated['uid'] ?? $request->input('uid'),
|
||||
]);
|
||||
|
||||
return (new TanamanResource($tanaman))
|
||||
|
||||
Reference in New Issue
Block a user