json(['data' => $data], $statusCode); } public function errorResponse($errorMessage, $statusCode) { return response()->json(['error' => $errorMessage, 'error_code' => $statusCode], $statusCode); } }