Download the PHP package homedoctor-es/recaptcha without Composer

On this page you can find all versions of the php package homedoctor-es/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 recaptcha

Recaptcha

A reCAPTCHA Validator for Laravel 5.

This is a forked version of the reCaptcha package for same functionality but with support for reCaptcha Version 3.

(Looking for a Laravel 4 version? Pull the latest 1.x tag. For Laravel 5.0, pull the latest 2.0 tag.)

For reCaptcha v3 support use dev-master from this repository.

Installation

Add the following line to the require section of composer.json:

or run the command below in terminal

Setup

  1. If you are using Laravel 5.5+ and using package auto-discovery, you can skip this step. For older versions or if you have disabled package auto-discovery continue with this step.

    In /config/app.php, add the following to providers:

    and the following to aliases:

  2. Run php artisan vendor:publish --provider="Kuttumiah\Recaptcha\RecaptchaServiceProvider".

  3. In /config/recaptcha.php, enter your reCAPTCHA public and private keys.

    • If you are not using the most recent version of reCAPTCHA, set version to 2 or 1.
    • If you are upgrading to v3 of reCAPTCHA, note that your keys from the previous version will not work, and you need to generate a new set in the reCAPTCHA admin.
  4. The package ships with a default validation message, but if you want to customize it, add the following line into resources/lang/[lang]/validation.php:

Migrating from greggilbert/recaptcha package

  1. In /config/app.php, remove the following from providers:

    and the following from aliases:

  2. Remove the following line from the require section of composer.json:

  3. Run the command below in terminal

  4. Follow the Setup steps.

Note: If you face any issue error while migrating please check the Troubleshoot section.

Usage

v2 (No Captcha)

  1. In your form, use {!! Recaptcha::render() !!} to echo out the markup.
  2. In your validation rules, add the following:

v1 (Legacy)

  1. In your form, use {!! Recaptcha::render() !!} to echo out the markup.
  2. In your validation rules, add the following:

It's also recommended to add required when validating.

Customization

reCAPTCHA v2 allows for customization of the widget through a number of options, listed at the official documentation. You can configure the output of the captcha through six allowed keys: theme, type, lang, callback, tabindex and expired-callback.

In the config file, you can create an options array to set the default behavior. For example:

would default the language in all the reCAPTCHAs to Japanese. If you want to further customize, you can pass options through the render option:

Options passed into Recaptcha::render will always supercede the configuration.

Language

To change the language of the captcha, simply pass in a language as part of the options:

For a list of valid language codes, consulting the official documentation.

Custom template

Alternatively, if you want to set a default template instead of the standard one, you can use the config:

or you can pass it in through the Form option:

Troubleshoot

While migrating from greggilbert/recaptcha package you might end up raising an error like below

> @php artisan package:discover

In ProviderRepository.php line 208:

    Class 'Greggilbert\Recaptcha\RecaptchaServiceProvider' not found

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

To resolve the issue I found a helpful resource on Stack Overflow which can fix this issue. Attaching the solution here for convenience.

Go to your project > bootstrap > cache > config.php file. Remove the provider and aliases from the cached array manually.

Or simply remove the file and generate again by running the command below,

v1 customization

For the v1 customization options, consult the old documentation and apply accordingly.

Limitation

Because of Google's way of displaying the reCAPTCHA, this package won't work if you load your form from an AJAX call. If you need to do it, you should use one of the alternate methods provided by Google.


All versions of recaptcha with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.1
illuminate/support Version ~5.1|^6.0|^7.0|^8.0|^9.0
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 homedoctor-es/recaptcha contains the following files

Loading the files please wait ....