kangkang66 / captcha
中文验证码
Installs: 3 293
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 3
Open Issues: 0
Type:captcha
Requires
- php: >=5.3.0
- ext-gd: *
This package is auto-updated.
Last update: 2024-11-09 11:19:06 UTC
README
Installation
Laravel 5.0.0 or later is required.
To get the latest version of Laravel Markdown, simply require the project using Composer:
$ composer require kangkang66/captcha
Next, You should need to register the service provider. Open up config/app.php
and add following into the providers
key.
\Chinesecaptcha\ChinesecaptchaServiceProvider::class
How to use it
//引用验证码 public function Captcha(Chinesecaptcha $chinesecaptcha) { $chinesecaptcha->outPut(); } //验证 public function Valid(Request $request) { //1.使用验证规则 $validParams = [ 'captcha' => 'required|chinesecaptcha', ]; //2.直接使用 session $str = session()->get('captcha'); }