This commit is contained in:
ivan-sim
2024-10-09 10:31:33 +07:00
parent 0c8feec075
commit 9a4e9db798
5 changed files with 37 additions and 5 deletions

View File

@@ -48,6 +48,8 @@ class OrganizationController extends Controller
public function store(Request $request)
{
$organization = [
'phone' => $request->no_hp,
'email' => $request->email,
'code' => $request->code,
'name' => $request->name,
'type' => 'hospital',
@@ -119,6 +121,8 @@ class OrganizationController extends Controller
$update_organization = Organization::find($id);
$update_organization->update([
'phone' => $request->no_hp,
'email' => $request->email,
'code' => $request->code,
'name' => $request->name,
'type' => 'hospital',
@@ -152,7 +156,7 @@ class OrganizationController extends Controller
'lat' => $request->lat,
'lng' => $request->lng,
]);
$update_organization->main_address_id = $newAddres->id;
$update_organization->save();