laravel api error response json code example Example: laravel response json status 500 return response()->json(['message' => 'error message'], 500);