定制 nuary/redis-captcha 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nuary/redis-captcha

Composer 安装命令:

composer require nuary/redis-captcha

包简介

Laravel 5 & 6 & lumen 6 Captcha Package

README 文档

README

A simple Lumen service provider for including the Captcha for Laravel.

for Lumen 6

Preview

Based on news/captcha

Installation

The Captcha Service Provider can be installed via Composer by requiring the mews/captcha package and setting the minimum-stability to dev (required for Lumen 6) in your project's composer.json.

{
    "require": {
        "nuary/redis-captcha": "^1.0"
    },
    "minimum-stability": "dev"
}

or

Require this package with composer:

composer require nuary/redis-captcha

Update your packages with composer update or install with composer install.

In Windows, you'll need to include the GD2 DLL php_gd2.dll in php.ini. And you also need include php_fileinfo.dll and php_mbstring.dll to fit the requirements of wtone/lumen-captcha's dependencies.

Usage

To use the Captcha Service Provider, you must register session provider and captcha provider when bootstrapping your application.

Configuration

create a new file config/captcha.php

return [
    'default'   => [
        'length'    => 5,
        'width'     => 120,
        'height'    => 36,
        'quality'   => 90,
        'math'      => true, //Enable Math Captcha
    ],
    // ...
];

in bootstrap/app.php.

    // regiseter Provider
    $app->register(Illuminate\Session\SessionServiceProvider::class);
    $app->register(Nuary\Captcha\CaptchaServiceProvider::class);
    // load config
    $app->configure('session');
    $app->configure('captcha');
    // set alias
    $app->alias('session', 'Illuminate\Session\SessionManager');
    $app->alias('Captcha', Nuary\Captcha\Facades\Captcha::class);

make sure create folder "storage/framework/session" and chmod it

Return Image

captcha();

or

Captcha::create();

Check Captcha

Captcha::check();

etc.

_

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固