codise/hclaravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

codise/hclaravel

最新稳定版本:1.3.6

Composer 安装命令:

composer require codise/hclaravel

包简介

The service provide hcaptcha for Laravel

README 文档

README

HC Laravel is a package using hcaptcha for stopping bots (hcaptcha.com)

This package support Laravel 6, 7, 8 and 9.

Installation

Install the package

composer require codise/hclaravel

Publish the config

php artisan vendor:publish --provider="Codise\Hclaravel\HcaptchaServiceProvider" --tag="config"

Configure hcaptcha.php in config folder. Add in environment .env variable the key of captcha

Configure providers and aliases

Add in config/app.php the follow line

'providers'  =>  [
	Codise\Hclaravel\HcaptchaServiceProvider::class,
]

'aliases' => [
    'Hcaptcha'  =>  Codise\Hclaravel\Hcaptcha::class
]

Usage

This package allows simply to use the captcha on your project without too much effort.

Account

Create an account on https://www.hcaptcha.com for having secret_key and site_key

Blade view

@include('hclaravel::captcha')

Controller

 use Hcaptcha;
 //response
 $response = Hcaptcha::verify($request->get('h-captcha-response'));
 
 //add condition for response
 if($response->success){
     $msg = "Robot verification success";
 }else{
     $msg = "Robot verification failed";
 }

License

HC Laravel is open-source software licensed MIT Licensed

Support

If you have any suggestion or if you use this application and if you like support opensource, don't forget button below

ko-fi

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-10-26