Download the PHP package miladshm/arcaptcha-laravel without Composer
On this page you can find all versions of the php package miladshm/arcaptcha-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download miladshm/arcaptcha-laravel
More information about miladshm/arcaptcha-laravel
Files in miladshm/arcaptcha-laravel
Package arcaptcha-laravel
Short Description Laravel Package for the ArCaptcha
License MIT
Homepage https://github.com/miladshm/arcaptcha-laravel
Informations about the package arcaptcha-laravel
Laravel ArCaptcha Package
Laravel Package for the ArCaptcha
This package supports PHP 7.3+.
For PHP integration you can use mohammadv184/arcaptcha package.
List of contents
- PHP ArCaptcha Library
- List of contents
- Installation
- Configuration
- Publish package
- Set the environment
- Customize error message
- How to use
- Embed Script in Blade
- Form setup
- Verify submitted data
- Credits
- License
Installation
You can install the package via composer:
Laravel 5.5 (or greater) uses package auto-discovery, so doesn't require you to manually add the Service Provider, but if you don't use auto-discovery ArCaptchaServiceProvider must be registered in config/app.php:
You can use the facade for shorter code. Add ArCaptcha to your aliases:
Configuration
Publish package
Create config/arcaptcha.php configuration file using the following artisan command:
Set the environment
Open .env file and set ARCAPTCHA_SITE_KEY and ARCAPTCHA_SECRET_KEY:
Customize error message
Before starting please add the validation message to resources/lang/[LANG]/validation.php file
How to use
How to use ArCaptcha in Laravel.
Embed Script in Blade
Insert @arcaptchaScript blade directive before closing </head> tag.
You can also use ArCaptcha::getScript().
Form setup
After you have to insert @arcaptchaWidget blade directive inside the form where you want to use the field arcaptcha-token.
You can also use ArCaptcha::getWidget().
Note : You can pass widget options into getWidget function or arcaptchaWidget directive like this : @arcaptchaWidget(['lang'=>'en'])
To see available options on widget see here
Verify submitted data
Add arcaptcha to your rules
Invisible mode example
Just try to pass size and callback option to getWidget function. Make sure to define callback function in global scope:
Credits
- Mohammad Abbasi
- All Contributors
License
The MIT License (MIT). Please see License File for more information.