fix add customer

main
nocode 1 year ago
parent 653167d918
commit ff2040e93f
  1. 6
      app/Http/Controllers/Api/AuthApiController.php

@ -132,6 +132,7 @@ class AuthApiController extends BaseAuthApiController
'grant' => !empty($grantParent) ? $grantParent + 1 : 1,
'phone' => $dataInsert['phone'] ?? '',
'address' => $dataInsert['address'] ?? '',
'created_at' => now(),
];
$agentInsertId = Agent::insertGetId($dataAgentInsert);
@ -145,7 +146,8 @@ class AuthApiController extends BaseAuthApiController
'agent_id' => $agentInsertId,
'status' => 1,
'code' => $agentCodeNew ?? '',
'agent_root_id' => $checkUserAgent->agent_root_id
'agent_root_id' => $checkUserAgent->agent_root_id,
'created_at' => now(),
]);
}
;
@ -211,7 +213,7 @@ class AuthApiController extends BaseAuthApiController
$finalData['gender'] = !empty($data['gender']) && $data['gender'] == 'male' ? 1 : 0;
}
$finalData['user_type'] = !empty($data['role']) ? $data['role'] : $this->_default_usertype;
$finalData['created_at'] = now();
return $finalData;
}
function getMessageReponse($key)

Loading…
Cancel
Save