定制 coderscoop/laravel-recaptcha 二次开发

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

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

coderscoop/laravel-recaptcha

Composer 安装命令:

composer require coderscoop/laravel-recaptcha

包简介

Google Recaptcha - Laravel integration

README 文档

README

Google Recaptcha - Laravel integration

Install

  • You can install directly using composer composer require coderscoop/laravel-recaptcha

  • Or include the package to your composer.json


"require": {
    "coderscoop/laravel-recaptcha": "*"
}

  • Or download it directly from the github repository

  • And run composer install or composer update


"require": {
    "coderscoop/laravel-recaptcha": "*"
},
"repositories": [
    {
        "type": "git",
        "url": "git@github.com:Coder-Scoop-Inc/laravel-recaptcha.git"
    }
]

  • And run composer install or composer update

Usage

  • Add Coderscoop\LaravelReCaptcha\ReCaptchaServiceProvider::class, to the providers array in config\app.php.

  • Add 'ReCaptcha' => Coderscoop\LaravelReCaptcha\Facade\ReCaptchaFacade::class, to the aliases array in config\app.php.

  • Add RECAPTCHA_PUBLIC_KEY and RECAPTCHA_PRIVATE_KEY to your .env file with the public and private keys.

  • Add the recaptcha field to your form {!! ReCaptcha::render() !!}

  • Optionally you can pass the recaptcha attributes as an array

        {!! 
            ReCaptcha::render([
                'theme' => 'light',
                'includeScript' => true,
                'responsive' => true
            ]) 
        !!}
    
    • theme: The google recaptcha theme
    • includeScript: If includes or no the google recaptcha script
    • responsive: Makes the field responsive or no
  • Or you can interact directly with the class api in your controller by adding use ReCaptcha;.

  • Add the recaptcha validation rule 'g-recaptcha-response' => 'required|recaptcha'

  • Enjoy it!

Extra

  • You could publish the recaptcha config file using php artisan vendor:publish --tag=config and you will have access to the recaptcha config file in app/config/recaptcha.php

ToDo

  • Add support for noscript
  • Add language file
  • Add support to integration with LaravelCollective

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固