PHPackages                             firecms-ext/captcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. firecms-ext/captcha

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

firecms-ext/captcha
===================

hyperf 扩展：图片验证码

0137PHP

Since Nov 22Pushed 3y agoCompare

[ Source](https://github.com/firecms-ext/captcha)[ Packagist](https://packagist.org/packages/firecms-ext/captcha)[ RSS](/packages/firecms-ext-captcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

firecms-ext/captcha
===================

[](#firecms-extcaptcha)

```
# 验证码 依赖安装
composer require firecms-ext/captcha
# 发布配置
php bin/hyperf.php vendor:publish firecms-ext/captcha

# 加密解密 依赖安装
composer require firecms-ext/crypt
# 发布配置
php bin/hyperf.php vendor:publish firecms-ext/crypt
# 生成密钥
php bin/hyperf.php gen:app-key
```

发布 Session 配置
-------------

[](#发布-session-配置)

> Session 组件的配置储存于 config/autoload/session.php 文件中，如文件不存在，您可通过 php bin/hyperf.php vendor:publish hyperf/session 命令来将 Session 组件的配置文件发布到 Skeleton 去。

```
php bin/hyperf.php vendor:publish hyperf/session
```

配置 Session 中间件
--------------

[](#配置-session-中间件)

> 在使用 Session 之前，您需要将 Hyperf\\Session\\Middleware\\SessionMiddleware 中间件配置为 HTTP Server 的全局中间件，这样组件才能介入到请求流程进行对应的处理，config/autoload/middlewares.php 配置文件示例如下：

```
