Download the PHP package scaffold-digital/laravel-recaptcha without Composer

On this page you can find all versions of the php package scaffold-digital/laravel-recaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-recaptcha

Laravel Recaptcha

This module is an easy to use implementation of the Google reCAPTCHA widget.

Getting Started

To use this package, simply install with Composer. Once installed, you'll need to specify your site key and secret key (from https://www.google.com/recaptcha/admin) and then follow a couple of simple steps to add the recaptcha widget to your view and verify the response.

Installing via Composer

To install the module, simply run the following command in your project directory...

Setting up your keys

Once you retrieved your site key and secret key (from https://www.google.com/recaptcha/admin), you'll need to specify them in a config file.

Basic configuration

For the most basic configuration, create the file "config/recaptcha.php" and paste the following contents, changing the keys accordingly...

Advanced configuration

If you'd like to extend the Recaptcha feature further, you can do so easily by publishing the full configuration and modifying it accordingly. Running the following command will allow you to publish the full configuration to your config directory.

Displaying the reCAPTCHA widget

In order to display the reCAPTCHA widget in your view, you'll need to include an additional piece of Javascript and a DOM element. Both of these are available through the Recaptcha class.

The Javascript

Simply add {!! Recaptcha::getScript(); !!} just before the closing <head> tag:

The Widget

Just add {!! Recaptcha::getWidget(); !!} wherever you'd like to display the widget in your form. For example:

Validating the reCAPTCHA response

You have two straightforward options to validate the reCAPTCHA response. This can be done manually at any point or automatically as part of Laravel's built-in form validation.

Automatic Form Validation

This package automatically creates a new validation type for 'recaptcha' that you can use to validate the form response. When the form is submitted, reCAPTCHA uses the field 'g-recaptcha-response' to provide the response. For example:

Manual Validation

If for whatever reason you'd like to validate the reCAPTCHA response manually, you can do so simply by calling the verify method. For example:


All versions of laravel-recaptcha with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
illuminate/support Version ^5.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package scaffold-digital/laravel-recaptcha contains the following files

Loading the files please wait ....