In API application I want to customize http errors (like 404, 500 or other http errors) I want to respond in this format
return response()->json(['message' => '', 'data' => null, 'result' => false],[specific error code]);
instead of showing laravel default error page enter image description here
how can I do that??