Download the PHP package coderscoop/laravel-recaptcha without Composer
On this page you can find all versions of the php package coderscoop/laravel-recaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download coderscoop/laravel-recaptcha
More information about coderscoop/laravel-recaptcha
Files in coderscoop/laravel-recaptcha
Package laravel-recaptcha
Short Description Google Recaptcha - Laravel integration
License MIT
Informations about the package laravel-recaptcha
laravel-recaptcha
Google Recaptcha - Laravel integration
Install
-
You can install directly using composer
composer require coderscoop/laravel-recaptcha
-
Or include the package to your composer.json
-
Or download it directly from the github repository
-
And run
composer install
orcomposer update
- And run
composer install
orcomposer update
Usage
-
Add
Coderscoop\LaravelReCaptcha\ReCaptchaServiceProvider::class
, to the providers array in config\app.php. -
Add
'ReCaptcha' => Coderscoop\LaravelReCaptcha\Facade\ReCaptchaFacade::class
, to the aliases array in config\app.php. -
Add
RECAPTCHA_PUBLIC_KEY
andRECAPTCHA_PRIVATE_KEY
to your .env file with the public and private keys. -
Add the recaptcha field to your form
{!! ReCaptcha::render() !!}
-
Optionally you can pass the recaptcha attributes as an array
theme
: The google recaptcha themeincludeScript
: If includes or no the google recaptcha scriptresponsive
: Makes the field responsive or no
-
Or you can interact directly with the class api in your controller by adding
use ReCaptcha;
. -
Add the recaptcha validation rule
'g-recaptcha-response' => 'required|recaptcha'
- Enjoy it!
Extra
- You could publish the recaptcha config file using
php artisan vendor:publish --tag=config
and you will have access to the recaptcha config file inapp/config/recaptcha.php
ToDo
- Add support for noscript
- Add language file
- Add support to integration with LaravelCollective