PHP code example of arcaptcha / arcaptcha-laravel

1. Go to this page and download the library: Download arcaptcha/arcaptcha-laravel 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/ */

    

arcaptcha / arcaptcha-laravel example snippets


'providers' => [
    ...
    Mohammadv184\ArCaptcha\Laravel\ArCaptchaServiceProvider::class,
];

'aliases' => [
    ...
    'ArCaptcha' => Mohammadv184\ArCaptcha\Laravel\Facade\ArCaptcha::class,
];

php artisan vendor:publish --provider="Mohammadv184\ArCaptcha\Laravel\ArCaptchaServiceProvider"

return [
    ...
    'arcaptcha' => 'Hey!!! :attribute is wrong!',
];

$validator = Validator::make(request()->all(), [
        ...
        'arcaptcha-token' => 'arcaptcha',
    ]);

    // check if validator fails
    if($validator->fails()) {
        ...
        $errors = $validator->errors();
    }