where('id', $master['department_id'])->first(); $class = DB::table('customer_class')->where('id', $master['class_id'])->first(); $master['class_code'] = $class['code']; $master['department_code'] = $department['code']; $ret = plugin_sync_api('postTax', $master); if ($ret['error_code'] > 0) { abort_error($ret['msg']); } return $params; } public function onBeforeDelete($params) { return $params; } }