get('phone'); $capcha = $captchaBuilder->build(); $expiredAt = now()->addMinutes(2); Cache::put($key, ['phone' => $phone, 'code' => $capcha->getPhrase()], $expiredAt); $result = [ 'captcha_key' => $key, 'expired_at' => $expiredAt->toDateTimeString(), 'captcha_image_content' => $capcha->inline() ]; return $this->response->array($result)->setStatusCode(201); } }