Code Monkey home page Code Monkey logo

geetest's Introduction

Geetest for Laravel

Install

composer require scyllaly/geetest

config

  • insert ServiceProvider into config/app.php
Scyllaly\Geetest\GeetestServiceProvider::class,
  • insert Alias into config/app.php
'Geetest' => Scyllaly\Geetest\Geetest::class,
  • publish config & view file
php artisan vendor:publish --provider='Scyllaly\Geetest\GeetestServiceProvider'
  • insert config fileds into .env , or get the config by CaptchaVerify Component
GEETEST_ID=
GEETEST_KEY=

View Config Fields

配置项 说明 选项 默认值
width 按钮宽度 单位可以是 px, %, em, rem, pt 300px
lang 语言,极验验证码免费版不支持多国语言 zh-cn, en, zh-tw, ja, ko, th zh-cn
server-get-config 从服务器获取GeetestKEY True False
product 验证码展示方式 popup, float popup
geetest_id 极验验证码ID
geetest_key 极验验证码KEY
client_fail_alert 客户端失败提示语 请完成验证码
server_fail_alert 服务端失败提示语 验证码校验失败

Usage

  • render your web page
{!! Geetest::render() !!}
  • request Validate
$this->validate($request, [
    'geetest_challenge' => 'required|geetest'
], [
    'geetest' => config('geetest.server_fail_alert')
]);
  • get config from database By app/geetest.php the field server-get-config, you can get your geetest id & and from database

Thanks

Germey/LaravelGeetest

License

The MIT License (MIT).

geetest's People

Contributors

scyllaly avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

libcyber

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.