From ff2040e93f00857e4563ba8be615a4cc3349344d Mon Sep 17 00:00:00 2001 From: nocode Date: Wed, 17 Jul 2024 15:41:31 +0700 Subject: [PATCH] fix add customer --- app/Http/Controllers/Api/AuthApiController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Api/AuthApiController.php b/app/Http/Controllers/Api/AuthApiController.php index 780dae0..a322740 100755 --- a/app/Http/Controllers/Api/AuthApiController.php +++ b/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)