Download the PHP package origami/captcha without Composer
On this page you can find all versions of the php package origami/captcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download origami/captcha
More information about origami/captcha
Files in origami/captcha
Package captcha
Short Description Simple Google Recaptcha integration for Laravel projects
License MIT
Informations about the package captcha
Origami Catpcha - Laravel Captcha Package
This package adds a validation rule and controller trait for easier integration with Google Recaptcha
Installation
Install this package through Composer.
Requirements
This package is designed to work with Laravel >= 10 currently. If you require 5.8 support, use version 1. If you require 6-7 support use version 2.
Setup
-
Signup for a Google Recaptcha account at https://www.google.com/recaptcha/admin
-
You should add a recatpcha section to your
config/services.php
file: -
Update your
.env
file with the key and secret: - Add a language line to your validation file(s), e.g.
resources/lang/en/validation.php
Usage
Validator
Controller Validation
(Assuming your Controller has the ValidatesRequests
trait)
Changing Google secret
If you have multiple Recaptcha secrets (e.g. for different versions), you can customise in the rule params. Otherwise it will default to config('services.recaptcha.secret')
Controller with ValidatesCaptcha Trait
Blade Helpers
This packages registers two Blade helpers:
@recaptchaField
is the equivalent of:
@recaptchaScript
is the equivalent of:
Upgrading
From v2 to v3
Version 3 was created to add Laravel 11.x support and drop support for Laravel versions before 10.x. This is a breaking change as the package now relies on Rule Objects.
The ValidatesCaptcha
trait validateReCaptcha
method has been renamed validateRecaptcha
Author
License
All versions of captcha with dependencies
illuminate/support Version ^10.0|^11.0
illuminate/validation Version ^10.0|^11.0
google/recaptcha Version ^1.2