Handlerid array handling error fixed

This commit is contained in:
Gowtham M 2025-11-06 15:25:50 +05:30
parent d1638ed79d
commit b20b1f9fb7

View File

@ -117,13 +117,15 @@ class StaffController extends ResourceController
try{
$data = $this->request->getJSON(true);
$handlerArray = $data['handler_id'] ?? [];
$insertData = [
'name' => $data['name'],
'email' => $data['email'],
'mobile' => $data['mobile'],
'role_id' => $data['role_id'],
'manager_id' => $data['manager_id'],
'handler_id' => $data['handler_id'] ?? null,
'handler_id' => json_encode($handlerArray),
'created_by' => $data['created_by']
];