📅  最后修改于: 2022-03-11 14:53:36.980000             🧑  作者: Mango
Set an "Accept": "application/json" Request Header
-- OR --
force the default response behavior by sepcifying the response() method
in your own CustomFormRequest class:
// -- example -- //
public function response(array $errors)
{
// Always return JSON.
return response()->json($errors, 422);
}