我将laravel API的响应发送为
if(...){
$return_array['status'] = '200';
$return_array['message'] = 'OTP SEND';
} else {
$return_array['status'] = '400';
$return_array['message'] = 'Username and Mobile Combination is Wrong';
}
return $this->response($return_array,200);
但响应状态始终为400
已附加图片
答案 0 :(得分:0)
您忘记在此行中关闭引号
$return_array['message'] = 'OTP SEND;
替换为
$return_array['message'] = 'OTP SEND';