content(),true); if(isset($return['code'])){ $data = $request->all(); $site = $data['site'] ?? "LFMY"; $path = $request->path(); $type = 0; if($path == "api/materialAddU8"){ $type = RecordTable::type_one; }elseif ($path == "api/productInAddU8"){ $type = RecordTable::type_two; }elseif ($path == "api/dispatchAddU8"){ $type = RecordTable::type_three; } $return_data = ""; if(! empty($return['data']) && is_array($return['data'])) $return_data = json_encode($return['data']); RecordTable::insert([ 'msg' => $return['msg'] ?? "", 'data' => json_encode($request->all()), 'crt_time' => time(), 'type' => $type, 'return_data' => $return_data, 'site' => $site, ]); } } }