PHPackages                             mcnub/nextcaptcha-laravel - 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. mcnub/nextcaptcha-laravel

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

mcnub/nextcaptcha-laravel
=========================

NextCaptcha integration for Laravel

1.0.1(7mo ago)0129MITPHPPHP ^8.1

Since Dec 21Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/mcnub/nextcaptcha-laravel)[ Packagist](https://packagist.org/packages/mcnub/nextcaptcha-laravel)[ RSS](/packages/mcnub-nextcaptcha-laravel/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

NextCaptcha for Laravel
=======================

[](#nextcaptcha-for-laravel)

Features
--------

[](#features)

- reCAPTCHA v2
- reCAPTCHA v2 Enterprise
- reCAPTCHA v2 HS Enterprise
- reCAPTCHA v3
- reCAPTCHA v3 HS
- Laravel Facade for easy usage
- Configurable through Laravel's configuration system
- Comprehensive logging support
- Proxy support
- Full TypeScript support for response types

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Laravel 9.0 or higher
- Guzzle 7.5 or higher

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

[](#installation)

You can install the package via composer:

```
composer require mcnub/nextcaptcha-laravel
```

After installing, publish the configuration file:

```
php artisan vendor:publish --tag=nextcaptcha-config
```

Configuration
-------------

[](#configuration)

Configure your NextCaptcha credentials in your `.env` file:

```
NEXTCAPTCHA_CLIENT_KEY=your-api-key
NEXTCAPTCHA_TIMEOUT=45
```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

Using the Facade:

```
use NextCaptcha\Facades\NextCaptcha;

// Solve reCAPTCHA v2
$result = NextCaptcha::recaptchaV2(
    websiteUrl: 'https://example.com',
    websiteKey: 'site-key'
);

// Get balance
$balance = NextCaptcha::getBalance();
```

Using Dependency Injection:

```
use NextCaptcha\NextCaptchaAPI;

class CaptchaController extends Controller
{
    public function __construct(
        private NextCaptchaAPI $captcha
    ) {}

    public function solve()
    {
        $result = $this->captcha->recaptchaV2(
            websiteUrl: 'https://example.com',
            websiteKey: 'site-key'
        );

        return response()->json($result);
    }
}
```

### Available Methods

[](#available-methods)

#### reCAPTCHA v2

[](#recaptcha-v2)

```
$result = NextCaptcha::recaptchaV2(
    websiteUrl: 'https://example.com',
    websiteKey: 'site-key',
    recaptchaDataSValue: '',  // optional
    isInvisible: false,       // optional
    apiDomain: '',           // optional
    pageAction: '',          // optional
    websiteInfo: ''          // optional
);
```

#### reCAPTCHA v2 Enterprise

[](#recaptcha-v2-enterprise)

```
$result = NextCaptcha::recaptchaV2Enterprise(
    websiteUrl: 'https://example.com',
    websiteKey: 'site-key',
    enterprisePayload: [],    // optional
    isInvisible: false,       // optional
    apiDomain: '',           // optional
    pageAction: '',          // optional
    websiteInfo: ''          // optional
);
```

#### reCAPTCHA v3

[](#recaptcha-v3)

```
$result = NextCaptcha::recaptchaV3(
    websiteUrl: 'https://example.com',
    websiteKey: 'site-key',
    pageAction: '',          // optional
    apiDomain: '',           // optional
    proxyType: '',          // optional
    proxyAddress: '',       // optional
    proxyPort: 0,           // optional
    proxyLogin: '',         // optional
    proxyPassword: '',      // optional
    websiteInfo: ''         // optional
);
```

#### hCaptcha

[](#hcaptcha)

```
$result = NextCaptcha::hCaptcha(
    websiteUrl: 'https://example.com',
    websiteKey: 'site-key',
    isInvisible: false,      // optional
    enterprisePayload: [],   // optional
    proxyType: '',          // optional
    proxyAddress: '',       // optional
    proxyPort: 0,           // optional
    proxyLogin: '',         // optional
    proxyPassword: ''       // optional
);
```

Testing
-------

[](#testing)

```
composer test
```

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

If you discover a security vulnerability within NextCaptcha Laravel, please send an e-mail to . All security vulnerabilities will be promptly addressed.

Credits
-------

[](#credits)

- [Nextcaptcha](https://github.com/nextcaptcha)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance64

Regular maintenance activity

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~340 days

Total

2

Last Release

219d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16283534?v=4)[Mcnub](/maintainers/mcnub)[@mcnub](https://github.com/mcnub)

---

Top Contributors

[![mcnub](https://avatars.githubusercontent.com/u/16283534?v=4)](https://github.com/mcnub "mcnub (3 commits)")

---

Tags

laravelrecaptchacaptchaanti-bothcaptchanextcaptcha

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mcnub-nextcaptcha-laravel/health.svg)

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

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k108.5M885](/packages/laravel-socialite)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M588](/packages/laravel-boost)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M164](/packages/spatie-laravel-health)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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