定制 va/cutlet-recaptcha 二次开发

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

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

va/cutlet-recaptcha

Composer 安装命令:

composer require va/cutlet-recaptcha

包简介

A package to use google recaptcha v2 with component and rule in laravel apps.

README 文档

README

GitHub issues GitHub stars GitHub forks GitHub license

Installation


composer require va/cutlet-recaptcha

Publish Config file


php artisan vendor:publish --tag=cutlet-recaptcha

Usage

Set the values for google api in .env file:

GOOGLE_RECAPTCHA_SITE_KEY=
GOOGLE_RECAPTCHA_SECRET_KEY=

You can add this tag in blade files:

<x-cutlet-recaptcha :has-error="$errors->has('g-recaptcha-response')"></x-cutlet-recaptcha>

and in the validation parts:

protected function validateLogin(Request $request)
    {
        $request->validate([
            $this->username() => ['required', 'string'],
            'password' => ['required', 'string'],
            'g-recaptcha-response' => ['required', 'cutlet_recaptcha']
            ]);
    }

and you can customize the language and validation message in config file;

return [
    'language' => 'fa',
    'site_key' => env('GOOGLE_RECAPTCAH_SITE_KEY'),
    'secret_key' => env('GOOGLE_RECAPTCAH_SECRET_KEY'),
    'message' => 'شما به عنوان ربات تشخیص داده شده‌اید'
];

Requirements:

  • PHP v7.0 or above
  • Laravel v7.0 or above

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固