Merge remote-tracking branch 'origin/staging' into origin/production
This commit is contained in:
@@ -136,11 +136,11 @@ class OrganizationController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
$update_organization->addresses()->updateOrCreate([
|
||||
$newAddres = $update_organization->addresses()->updateOrCreate([
|
||||
'id' => $update_organization->main_address_id
|
||||
], [
|
||||
'use' => 'both',
|
||||
'type' => 'physical',
|
||||
'type' => 'hospital',
|
||||
'text' => $request->address,
|
||||
'province_id' => $request->province_id,
|
||||
'city_id' => $request->city_id,
|
||||
@@ -150,6 +150,10 @@ class OrganizationController extends Controller
|
||||
'lat' => $request->lat,
|
||||
'lng' => $request->lng,
|
||||
]);
|
||||
|
||||
$update_organization->main_address_id = $newAddres->id;
|
||||
$update_organization->save();
|
||||
|
||||
|
||||
return response()->json([
|
||||
'message' => 'Data berhasil diubah',
|
||||
|
||||
Reference in New Issue
Block a user