laravel api form request validation 404

Solutions on MaxInterview for laravel api form request validation 404 by the best coders in the world

showing results for - "laravel api form request validation 404"
Edwina
26 Aug 2018
1Set an "Accept": "application/json" Request Header
2 -- OR --
3force the default response behavior by sepcifying the response() method
4in your own CustomFormRequest class:
5// -- example -- //
6public function response(array $errors)
7{
8    // Always return JSON.
9    return response()->json($errors, 422);
10}