Я создаю REST API с использованием Laravel 5.7. Его alwasys возвращает 302 с перенаправлением Respose с HTML-кодом, как показано ниже
<!DOCTYPE html><html>
<head>
<meta charset="UTF-8" />
<meta http-equiv="refresh" content="0;url=http://localhost/Ozone/en" />
<title>Redirecting to http://localhost/Ozone/en</title>
</head>
<body>
Redirecting to <a href="http://localhost/Ozone/en">http://localhost/Ozone/en</a>.
</body>
{
"status": false,
"message": "Input are not valid",
"error":
{
"contact_number": ["The contact number has already been taken."]
}
}
Я хочу только JSON Response, такой как
{
"status": false,
"message": "Input are not valid",
"error": {
"contact_number": ["The contact number has already been taken."]
}
}
Пожалуйста, помогите мне