PHP code example of csuilong / luosimao-captcha

1. Go to this page and download the library: Download csuilong/luosimao-captcha library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

csuilong / luosimao-captcha example snippets


'providers' => [
    // Other Service Providers

    Pokeguys\Luosimao\LuosimaoServiceProvider::class,
],

'aliases' => [
  // Other Aliases

  'Luosimao' => Pokeguys\Luosimao\Facades\Luosimao::class,
],

[
  // Other validation message

  'luosimao' => 'The :attribute field is not correct.',
]

$rules = [
    // ...
    'luosimao' => '

        $this->validate($request,[
            'luotest_response' => '证码!',
            'luotest_response.luosimao'  => '验证码错误,请重试。',
        ]);