$response->status(), 'successful' => $response->successful(), 'failed' => $response->failed(), 'clientError' => $response->clientError(), 'serverError' => $response->serverError(), ]); } private function errorResponse(string $code, string $message) { return response()->json([ 'code' => $code, 'status' => 'error', 'message' => $message, ]); } }