csuilong/luosimao-captcha is a Laravel package for luosimao validator for laravel 5 能用的我更新过了.
It currently has 0 GitHub stars and 18 downloads on Packagist (latest version V2.0.1).
Install it with composer require csuilong/luosimao-captcha.
Discover more Laravel packages by csuilong
or browse all Laravel packages to compare alternatives.
Last updated
A Luosimao Validator for Laravel 5.
Add the following line to the require section of composer.json:
"require": {
"pokeguys/laravel-luosimao-captcha": "dev-master"
}
/config/app.php, add the following to providers:'providers' => [
// Other Service Providers
Pokeguys\Luosimao\LuosimaoServiceProvider::class,
],
and the following to aliases:
'aliases' => [
// Other Aliases
'Luosimao' => Pokeguys\Luosimao\Facades\Luosimao::class,
],
php artisan vendor:publish --provider="Pokeguys\Luosimao\LuosimaoServiceProvider"./config/luosimao.php, enter your Luosimao public and private keys.resources/lang/[lang]/validation.php:[
// Other validation message
'luosimao' => 'The :attribute field is not correct.',
]
In your validation rules, add the following:
$rules = [
// ...
'luosimao' => 'required|luosimao',
];
$this->validate($request,[
'luotest_response' => 'required|luosimao',
],[
'luotest_response.required' => '请点按验证码!',
'luotest_response.luosimao' => '验证码错误,请重试。',
]);
It's also recommended to add required when validating.