承接 suitmedia/captcha 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

suitmedia/captcha

Composer 安装命令:

composer require suitmedia/captcha

包简介

This package is captcha based on cool-php-captcha 0.3.1. It provides simple call usage and validation.

README 文档

README

Simple image captcha based on cool-php-captcha v0.3.1.

Latest Stable Version Total Downloads

Update 1.2.0

Support for Laravel 5. For Laravel 4, use version 1.1.1.

Update 1.1.1

Url captcha image now have random number on query string

Update 1.1.0

Added Captcha::isValid($value) for checking captcha session.

Installation

Firstly, you need to add the package to the require attribute of your composer.json file:

{
    "require" : {
        "wicochandra/captcha": "1.*"
    }
}

Now, run composer update from command line to install the package.

Then, update your config/app.php by adding new value to the providers and alias key:

    'providers' => array (

        //...

        'Wicochandra\Captcha\CaptchaServiceProvider'
    ),

    //...

    'aliases' => array (

        //...

        'Captcha'         => 'Wicochandra\Captcha\Facade\Captcha',
    ),

Lastly, you need to publish vendor assets

    php artisan vendor:publish

Usage

There are two main usage of the package.

  1. Image link, you can use the following directive to generate the captcha link.
    //Will return http://[web url]/captcha/image
    Captcha::url();
  1. Validator, you can use captcha validator or Captcha::isValid($value) to validate whether the input is match with the captcha image or not.
   $rules = array(
        '[input name]' => 'captcha'
    );

    Captcha::isValid('captcha-input');  //return true if valid. Otherwise return false

Note: You have to define validation error message for captcha by yourself on resources/lang/{locale}/validation.php

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固