PHPackages                             shirakun/laravel-capjs - 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. shirakun/laravel-capjs

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

shirakun/laravel-capjs
======================

A package to help you implement the cap.js (CAP Worker Service) CAPTCHA alternative

v0.0.6(4mo ago)06MITPHPPHP ^8.2|^8.3|^8.4

Since Dec 26Pushed 4mo agoCompare

[ Source](https://github.com/shirakun/laravel-capjs)[ Packagist](https://packagist.org/packages/shirakun/laravel-capjs)[ Docs](https://github.com/shirakun/laravel-capjs)[ RSS](/packages/shirakun-laravel-capjs/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Cap.js
==============

[](#laravel-capjs)

[![Latest Version on Packagist](https://camo.githubusercontent.com/25c9618d236775e9ff98c2fd21bcbd492ee28014a9ed268512bc3137229bbada/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73686972616b756e2f6c61726176656c2d6361706a732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/shirakun/laravel-capjs)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f68ce9fec871758a9b7e1a57ad8cdd5614e018ee89271e9af3e2fdadc285bda4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f73686972616b756e2f6c61726176656c2d6361706a732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/shirakun/laravel-capjs/actions?query=workflow%3Arun-tests+branch%3Amain)

**Laravel Cap.js**, is a package to help you implement [cap.js (CAP Worker Service)](https://captcha.gurl.eu.org/) easily.

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

[](#installation)

You can install the package via composer:

```
composer require shirakun/laravel-capjs
```

You can publish the config file with:

```
php artisan vendor:publish --tag="capjs-config"
```

This is the contents of the published config file:

```
return [
    /*
    |--------------------------------------------------------------------------
    | Cap.js Keys
    |--------------------------------------------------------------------------
    |
    | This value is the site, and the secret key of your application.
    | Cap.js might not require these by default, but they are available
    | for custom worker endpoints.
    |
    */
    'capjs_site_key' => env('CAPJS_SITE_KEY', null),

    'capjs_secret_key' => env('CAPJS_SECRET_KEY', null),

    'capjs_api_endpoint' => env('CAPJS_API_ENDPOINT', 'https://captcha.gurl.eu.org/api/validate'),

    /*
    |--------------------------------------------------------------------------
    | Error Messages
    |--------------------------------------------------------------------------
    |
    | Here you can find the error messages for the application. You can modify
    | or translate the error message as you like.
    |
    */
    'error_messages' => [
        'capjs_check_message' => 'The CAPTCHA thinks you are a robot! Please refresh and try again.',
    ],
];
```

Usage
-----

[](#usage)

### Cap.js Widget Component

[](#capjs-widget-component)

Once you require this package, you can use the capjs widget in your form, like the following:

```

```

### Cap.js Backend Validation

[](#capjs-backend-validation)

Once you use the widget component in the frontend, you can validate the Cap.js response by using the `validate` method.

Here's an example:

```
use Shirakun\LaravelCapjs\Facades\LaravelCapjs;

public function store(Request $request)
{
    $response = LaravelCapjs::validate();

    if (! $response['success']) {
        // do your logic
    }
}
```

You may, optionally, send the token with the validation method:

```
public function store(Request $request)
{
    $response = LaravelCapjs::validate(
        $request->get('cap-token');
    );
}
```

### Cap.js Custom Rule

[](#capjs-custom-rule)

If you want clean validation, you can use the `CapjsCheck` custom rule:

```
use Shirakun\LaravelCapjs\Rules\CapjsCheck;

public function store(Request $request)
{
    $request->validate([
        'cap-token' => [new CapjsCheck()]
    ]);
}
```

Credits
-------

[](#credits)

- [ousid](https://github.com/ousid)
- [cap.js](https://captcha.gurl.eu.org/)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance75

Regular maintenance activity

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

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

3

Last Release

137d ago

PHP version history (2 changes)v0.0.2PHP ^8.2|^8.3

v0.0.4PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/7666f14005d0c2cf8793ea5fa75e779cee104ef0447ea333c6e188f4fd19f398?d=identicon)[shirakun](/maintainers/shirakun)

---

Top Contributors

[![ousid](https://avatars.githubusercontent.com/u/21012933?v=4)](https://github.com/ousid "ousid (35 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")[![faabiopontes](https://avatars.githubusercontent.com/u/2223935?v=4)](https://github.com/faabiopontes "faabiopontes (1 commits)")[![jeffersongoncalves](https://avatars.githubusercontent.com/u/411493?v=4)](https://github.com/jeffersongoncalves "jeffersongoncalves (1 commits)")

---

Tags

laravelcaptchacap.jsshirakunlaravel-capjs

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/shirakun-laravel-capjs/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[josiasmontag/laravel-recaptchav3

Recaptcha V3 for Laravel package

2641.6M2](/packages/josiasmontag-laravel-recaptchav3)

PHPackages © 2026

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