Download the PHP package rvxlab/hcaptcha without Composer

On this page you can find all versions of the php package rvxlab/hcaptcha. 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 hcaptcha

Laravel HCaptcha

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

A package to easily include HCaptcha in Laravel.

This project is originally based on laravel-reCAPTCHA and forked from Scyllaly, who seemingly abandoned the project.

This fork is a near-drop-in replacement for Scyllaly's package, maintaining the same namespace for 4.x and 5.x versions.

Requirements

Laravel version Minimum PHP version
8.x 7.4
9.x 8.0
10.x 8.1
11.x 8.2

Need support for Laravel 7 or before? Check the 4.x branch.

Installation

Install the package with Composer:

Publish the config file:

Optionally publish the translations:

Optionally publish the views:

Configuration

Add HCAPTCHA_SECRET and HCAPTCHA_SITEKEY in .env file :

You can obtain them from your HCaptcha dashboard.

Usage

Prepare the script

First you need to initialize the script:

You can optionally set the locale and the custom callback function:

You can also use the app locale if you have a multilingual application:

Render the widget

This package provides support for the regular widget, as well as the invisible captcha.

Initialize the regular widget:

Any attributes can be passed as an array to the display method or as properties on the Blade component:

Invisible widget

If you rather want forms to have an invisible widget:

If you have a custom callback defined for your forms you can define a data-callback attribute:

Validation

Add 'h-captcha-response' => 'required|HCaptcha' to the rules array:

Testing

You can mock the HCaptcha validation by calling the shouldReceive method on the HCaptcha facade:

Or when testing a JSON call:

Upgrading

Check the Upgrade Guide for notes on updating from 4.x to 5.x.

License

This package is licensed under MIT.


All versions of hcaptcha with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
ext-json Version *
illuminate/support Version ^8.28 || ^9.0 || ^10.0 || ^11.0
guzzlehttp/guzzle Version ^7.4
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 rvxlab/hcaptcha contains the following files

Loading the files please wait ....