guchangsheng / defender_captcha by guchangsheng

captcha for lumen
598
0
1
Package Data
Maintainer Username: guchangsheng
Maintainer Contact: 281759286@qq.com (defender)
Package Create Date: 2018-05-28
Package Last Update: 2021-06-02
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 15:13:54
Package Statistics
Total Downloads: 598
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 1
Total Forks: 0
Total Open Issues: 0

Captcha for Lumen 兼容支持lumen 5.5

基于 Captcha for Laravel 5lumen-captcha 的修正

#启用cache###env配置如下 CACHE_DRIVER=redis REDIS_HOST=127.0.0.1 REDIS_PORT= REDIS_PASSWORD=

####config配置文件 *拷贝config目录下的captcha.php image.php到那项目config目录

##注册 #bootstrap目录下的app.php添加如下 $app->configure('image'); $app->configure('captcha'); $app->register(Yangbx\CaptchaLumen\CaptchaServiceProvider::class);

Preview

Preview

###创建路由

/************/ $api->group(['namespace' => 'Yangbx\CaptchaLumen'],function($api){ //验证码 $api->get('Info/{type}', ['as' => 'captcha', 'uses' => 'LumenCaptchaController@getCaptchaInfo']); $api->get('captcha/{type}/{captchaId}', ['uses' => 'LumenCaptchaController@getCaptcha']);

});

Links