PHPackages                             canducci/recaptcha - 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. [Security](/categories/security)
4. /
5. canducci/recaptcha

ActiveLibrary[Security](/categories/security)

canducci/recaptcha
==================

Canducci Recaptcha

v1.0.1(10y ago)012MITPHPPHP &gt;=5.3.0

Since Jan 5Pushed 10y agoCompare

[ Source](https://github.com/netdragoon/recaptchaphp)[ Packagist](https://packagist.org/packages/canducci/recaptcha)[ Docs](https://github.com/netdragoon/recaptchaphp)[ RSS](/packages/canducci-recaptcha/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (4)Dependencies (3)Versions (6)Used By (0)

### CANDUCCI RECAPTCHA

[](#canducci-recaptcha)

[![CANDUCCI RECAPTCHA](https://camo.githubusercontent.com/67f2a58a5ab80c2ab109988efc5590abd6fee214ca8a3cedeaa5fb52e69130b7/687474703a2f2f69313139342e70686f746f6275636b65742e636f6d2f616c62756d732f61613337372f6e6574647261676f6f6e312f636170746368615f7a7073786669346b70676e2e706e67)](https://packagist.org/packages/canducci/recaptcha)

[![Build Status](https://camo.githubusercontent.com/021f698c5de6502d29a0bdaab8accce4d3ff5ca3130d0408f47766cab6d55217/68747470733a2f2f7472617669732d63692e6f72672f6e6574647261676f6f6e2f7265636170746368617068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/netdragoon/recaptchaphp)[![Packagist](https://camo.githubusercontent.com/6ee40dcdcb9c455c0a9888f7de7cdb9a7d20bb2782f6009218d87194e7c1b77e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f63616e64756363692f7265636170746368612e7376673f7374796c653d666c6174)](https://packagist.org/packages/canducci/recaptcha)[![Packagist](https://camo.githubusercontent.com/d283b1ee0be95c28ac8bdf9744915948a6c55c5dbd8fa25c315e533080351ccb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64642f63616e64756363692f7265636170746368612e7376673f7374796c653d666c6174)](https://packagist.org/packages/canducci/recaptcha)[![Packagist](https://camo.githubusercontent.com/93d086c6e5c706ba5d5a27976785772511a0e94c453d5812385099e8b61e96ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f63616e64756363692f7265636170746368612e7376673f7374796c653d666c6174)](https://packagist.org/packages/canducci/recaptcha)[![Packagist](https://camo.githubusercontent.com/9dbbc6cbcca41e9b20430f68863e961148d29373c59f5c1746420ddb2c8eac26/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f63616e64756363692f7265636170746368612e737667)](https://packagist.org/packages/canducci/recaptcha)[![Packagist](https://camo.githubusercontent.com/2c90f2a5a41d3d660d8d672316ee717e24bf6810e05a84230b573dff4f30a7a2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f63616e64756363692f7265636170746368612e7376673f6c6162656c3d76657273696f6e)](https://packagist.org/packages/canducci/recaptcha)![](https://camo.githubusercontent.com/ddb24599424630c237650e8bebd4730b6be00abe18e6d22c7df82e9ef509b3c9/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f7061636b61676973742e6f72672f7061636b616765732f63616e64756363692f7265636170746368612e7376673f7374796c653d736f6369616c)

Quick start
-----------

[](#quick-start)

### Required setup

[](#required-setup)

In the `require` key of `composer.json` file add the following

```
"canducci/recaptcha": "1.0.*"
```

Run the Composer update comand

```
$ composer update

```

In your `config/app.php` add `providers` array

```
'providers' => array(
    ...,
    Canducci\ReCaptcha\Providers\ReCaptchaServiceProvider::class,
),
```

At the end of `config/app.php` add o `aliases` (Facade) in array

```
'aliases' => array(
    ...,
    'ReCaptcha' => Canducci\ReCaptcha\Facades\ReCaptcha::class,
),
```

Run the Artisan comand

```
php artisan vendor:publish --force --provider="Canducci\ReCaptcha\Providers\ReCaptchaServiceProvider"

```

In the `config/recaptcha.php` add `site_key` e `secret_key` of *Google ReCaptcha* ().

\###Usage

**Blade in View**

The `@recaptchascript()` blade in the tag ``, example:

```
>

    ReCaptcha Test
    @recaptchascript()

```

The `@recaptcha()` blade in the tag ``, example:

```

    @recaptcha()
    Send

```

---

**Variable in View**

*Controller*

```
public function index1()
{
    return view('index1')
        ->with('script', recaptcha_script())
        ->with('captcha', recaptcha_render());
}
```

*Html*

```
>

    ReCaptcha Test
    {!! $script !!}
```

and

```

    {!! $captcha !!}
    Send

```

---

**Verify** `g-recaptcha-response` **is valid?**

**Use namespace:**

```
use App\Http\Requests\ReCaptchaRequest;
use Canducci\ReCaptcha\ReCaptcha;

```

1. With `ReCaptchaRequest`, example:

```
public function post(ReCaptchaRequest $request, ReCaptcha $re)
{

}
```

2. In the method, example:

```
public function v(Request $request, ReCaptcha $re)
{

    $valid = $re->valid($request->get('g-recaptcha-response'));

    if ( $valid->success() )
    {
        //success
    }
    else
    {
        //not valid
        var_dump( $valid->errors() );
    }
}
```

---

\###The settings of the tags can be like this:

1. Function:

```
$script = recaptcha_script(Canducci\ReCaptcha\ReCaptchaScriptRender::Onload,
                           Canducci\ReCaptcha\ReCaptchaScriptLanguage::Armenian,
                           'function_CallBack');

$render = recaptcha_render(Canducci\ReCaptcha\ReCaptchaRenderTheme::Ligth,
                           Canducci\ReCaptcha\ReCaptchaRenderDataType::Image,
                           Canducci\ReCaptcha\ReCaptchaRenderDataSize::Normal,
                           0,
                           'function_CallBack',
                           'function_dataExpiredCallBack');
```

2. Facade:

```
use `Canducci\ReCaptcha\Facades\ReCaptcha as ReCaptchaFacade`
```

```
$script = ReCaptchaFacade::script(Canducci\ReCaptcha\ReCaptchaScriptRender::Onload,
                                  Canducci\ReCaptcha\ReCaptchaScriptLanguage::Armenian,
                                  'function_CallBack');

$render = ReCaptchaFacade::render(Canducci\ReCaptcha\ReCaptchaRenderTheme::Ligth,
                                  Canducci\ReCaptcha\ReCaptchaRenderDataType::Image,
                                  Canducci\ReCaptcha\ReCaptchaRenderDataSize::Normal,
                                  0,
                                  'function_CallBack',
                                  'function_dataExpiredCallBack');
```

3. Blade:

```
@recaptchascript(Canducci\ReCaptcha\ReCaptchaScriptRender::Onload,
                 Canducci\ReCaptcha\ReCaptchaScriptLanguage::Armenian,
                 'function_CallBack')

@recaptcha(Canducci\ReCaptcha\ReCaptchaRenderTheme::Ligth,
           Canducci\ReCaptcha\ReCaptchaRenderDataType::Image,
           Canducci\ReCaptcha\ReCaptchaRenderDataSize::Normal,
           0,
           'function_CallBack',
           'function_dataExpiredCallBack')
```

**Obs:** *These settings are not compulsory, but if necessary, following Google's website tutorial can be made.*

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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 ~0 days

Total

5

Last Release

3781d ago

Major Versions

v0.2-alpha → v1.0.02016-01-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/43fc765f09ee564408d8da952d2ea824c1c8d2ab7e0aa055885fa011d92082fa?d=identicon)[fulviocanducci](/maintainers/fulviocanducci)

---

Top Contributors

[![netdragoon](https://avatars.githubusercontent.com/u/15145509?v=4)](https://github.com/netdragoon "netdragoon (21 commits)")

---

Tags

googlerecaptchacanducci

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/canducci-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/canducci-recaptcha/health.svg)](https://phpackages.com/packages/canducci-recaptcha)
```

###  Alternatives

[phelium/recaptcha

reCAPTCHA v2 class

4389.4k](/packages/phelium-recaptcha)[cakephp-fr/recaptcha

To easily use Google Recaptcha (free CAPTCHA service that protect websites from spam and abuse) in CakePHP projects

1419.3k](/packages/cakephp-fr-recaptcha)[cake17/cakephp-recaptcha

\[DEPRECIATED\] Please use https://github.com/cakephp-fr/recaptcha/

1211.0k1](/packages/cake17-cakephp-recaptcha)

PHPackages © 2026

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