npm install --save-dev node-sass@4.7.2
npm WARN已弃用request@2.79.0:已弃用该请求,请参见https://github.com/request/request/issues/3142 npm WARN弃用了request@2.88.2:请求已弃用,请参见https://github.com/request/request/issues/3142 npm ERR!解析'... Va0k1IWcuoPwX8jicqISh'附近的JSON输入时意外结束
答案 0 :(得分:0)
请尝试使用新版本的node-sass。.此版本取决于不再受支持且已完全弃用的librar(请求)。尝试
public function message(Request $request)
{
$message = $request->input('message');
$postData = $request->all();
foreach ($postData['phone'] as $index => $value) {
$postData['phone'][$index] = Str::replaceFirst('1', '965', $value);
}
foreach ($postData['name'] as $index => $names) {
$postData['name'][$index] = $names;
}
$phone_number = implode(',', $postData['phone']);
$name = implode(',', $postData['name']);
$send_message = new MyHelper();
$message = "Hi, $name $message";
$send_message->sendMessage($phone_number, $message);
return 'success';
}