**Need to return laravel validation response which is come from Post API
使用Laravel 5.2从表单中进行请求**
public function aperi(Request $request){
$endpoint = "MyURL";
$client = new \GuzzleHttp\Client();
$name = $request->addavpname;
$email = $request->addavpemail;
$status = $request->addStatus;
$response = $client->request('POST', $endpoint, ['query' => [
'addavpname' => $name,
'addavpemail' => $email,
'addStatus' => $status
]]);
$statusCode = $response->getStatusCode();
$content = $response->getBody();
$content = json_decode($response->getBody(), true);
}
Client error: `POST "MY URL"
addavpname=No%20avp&addavpemail=noavp%40mobilelinkusa.com&addStatus=active`
resulted in a `400 Bad Request` response:
{"addavpname":["The addavpname has already been taken."],"addavpemail":
["The addavpemail has already been taken."]}
请帮助我。 如何解决?谢谢