pokeguys / luosimao-captcha
Luosimao Validator for Laravel 5
1.0.0
2017-10-23 05:28 UTC
Requires
- php: >=5.4.0
- illuminate/support: ~5.1
This package is not auto-updated.
Last update: 2025-05-11 08:24:04 UTC
README
A Luosimao Validator for Laravel 5.
Installation
Add the following line to the require
section of composer.json
:
"require": { "pokeguys/laravel-luosimao-captcha": "dev-master" }
Setup
- In
/config/app.php
, add the following toproviders
:
'providers' => [ // Other Service Providers Pokeguys\Luosimao\LuosimaoServiceProvider::class, ],
and the following to aliases
:
'aliases' => [ // Other Aliases 'Luosimao' => Pokeguys\Luosimao\Facades\Luosimao::class, ],
- Run
php artisan vendor:publish --provider="Pokeguys\Luosimao\LuosimaoServiceProvider"
. - In
/config/luosimao.php
, enter your Luosimao public and private keys. - The package ships with a default validation message, but if you want to customize it, add the following line into
resources/lang/[lang]/validation.php
:
[ // Other validation message 'luosimao' => 'The :attribute field is not correct.', ]
Usage
In your validation rules, add the following:
$rules = [ // ... 'luosimao' => 'required|luosimao', ];
It's also recommended to add required
when validating.