PHPackages                             philharmonie/laravel-hcaptcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. philharmonie/laravel-hcaptcha

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

philharmonie/laravel-hcaptcha
=============================

Easy way to add hcaptcha to your laravel app

0146PHP

Since Jul 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/philharmonie/laravel-hcaptcha)[ Packagist](https://packagist.org/packages/philharmonie/laravel-hcaptcha)[ RSS](/packages/philharmonie-laravel-hcaptcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel hCaptcha Package
========================

[](#laravel-hcaptcha-package)

This package provides an easy-to-integrate hCaptcha validation rule for Laravel applications, enabling you to protect your forms from bots and spam efficiently. It uses Laravel's built-in HTTP client and validation features to simplify the implementation of hCaptcha.

Features
--------

[](#features)

- Easy integration with any Laravel form.
- Custom validation rule for hCaptcha.
- Configurable through Laravel's standard configuration methods.

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

You can install the package via Composer by running the following command:

```
composer require philharmonie/hcaptcha
```

If you are using a private repository or a local version of the package, ensure you have configured your `composer.json` appropriately to recognize the package location.

### Publishing Configuration

[](#publishing-configuration)

After installation, publish the configuration file to your application:

```
php artisan vendor:publish --provider="Philharmonie\LaravelHcaptcha\LaravelHcaptchaServiceProvider" --tag="hcaptcha-config"
```

This will copy the default configuration file to your application's config directory.

### Environment Configuration

[](#environment-configuration)

Add the following entries to your `.env` file to configure your hCaptcha keys:

```
HCAPTCHA_SITE_KEY=your_site_key_here
HCAPTCHA_SECRET_KEY=your_secret_key_here

```

Replace `your_site_key_here` and `your_secret_key_here` with your actual hCaptcha site and secret keys, respectively.

Usage
-----

[](#usage)

To use the hCaptcha rule, include it in your form request validation rules like this:

```
$request->validate([
    'h-captcha-response' => new ValidateHCaptcha(),
]);
```

Add the hcaptcha script to your `` and optionally provide a [language identifier](https://docs.hcaptcha.com/languages):

```
@hcaptchascript(de)

```

Simply include the hCaptcha widget as follows:

```

    @csrf

    @hcaptcha

    Submit

```

Contributing
------------

[](#contributing)

Contributions are welcome, especially from those who also use this package in their own applications. To contribute:

1. Fork the repository.
2. Create a new branch for each feature or improvement.
3. Send a pull request from each feature branch to the main branch.

Support
-------

[](#support)

If you encounter any problems or have any suggestions, please open an issue on the GitHub repository page.

License
-------

[](#license)

The Laravel hCaptcha package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/49812f3fd6f17e6c988107697eac9df6d436ab9d751ab0e8c31cba6dd9cc4f7b?d=identicon)[philharmonie](/maintainers/philharmonie)

---

Top Contributors

[![harmoniemedia](https://avatars.githubusercontent.com/u/111133037?v=4)](https://github.com/harmoniemedia "harmoniemedia (1 commits)")[![philharmonie](https://avatars.githubusercontent.com/u/5270589?v=4)](https://github.com/philharmonie "philharmonie (1 commits)")

### Embed Badge

![Health badge](/badges/philharmonie-laravel-hcaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/philharmonie-laravel-hcaptcha/health.svg)](https://phpackages.com/packages/philharmonie-laravel-hcaptcha)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
