Download the PHP package joshuavanderpoll/laravel-captchas without Composer

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

Laravel Captchas

Latest Version on Packagist Tests Total Downloads


broken_circle · click the circle with a gap

scatter · read the highlighted letters

rotate · turn each image upright

slider · drag the piece into the gap

grid · select every matching image

tiles · click the tiles out of place
Animated demos of each challenge are in the docs.

Image captchas for Laravel that work with JavaScript fully disabled. Every challenge is drawn server-side with GD and solved with plain HTML and CSS, and the answer is validated against a secret kept in the cache. You can drop a captcha into your own form, render a standalone page, or put a full-page gate (with an optional waiting queue) in front of any route.

Why this package

Challenges

Six challenge types ship. Each has its own page with a screenshot and all its options.

Challenge What the visitor does Docs
broken_circle (default) Click the circle that has a gap docs
scatter Read the highlighted letters and type them docs
rotate Turn each image upright docs
slider Drag the puzzle piece into the gap docs
grid Select every image that matches a word docs
tiles Click the tiles that are out of place docs

Pick one with default, or per gate with gate.challenge:

You can also pass a list to serve a random mix, a different challenge is chosen each time a captcha is generated:

Which one to pick

Ratings are relative within this package and deliberately conservative. No client-side captcha is unbeatable, so treat the visual challenge as one layer and lean on the gate's rate limiting, attempt limits and conditions for the real defence.

Challenge vs scripted bots vs AI / ML bots Server cost Human effort Good for
broken_circle Low-Medium Low Very low Very easy Cheap, high-traffic gates against simple bots
scatter High Medium Medium Medium Text-style challenge that resists naive OCR
rotate Medium-High Medium Medium-High Easy Orientation task; raise noise against ML
slider Medium Low-Medium Medium Easy Familiar drag UX; weakest to template matching
grid High Low High Medium Familiar "pick the X", but classifiers beat it
tiles High Medium-High Medium-High Medium Hardest for off-the-shelf AI

Classification (grid) and template matching (slider, broken_circle) are what off-the-shelf models do well, so they rate lowest against AI. tiles needs spatial reasoning and scatter/rotate fight OCR and orientation models, which is harder to automate, more so with noise turned up and your own images. Mixing challenges forces a bot to handle several mechanisms instead of specialising in one.

Use your own images for the image challenges. rotate, slider, grid and tiles ship with a small set of CC-licensed placeholder images so the package works out of the box. That set is tiny and easy for a bot to fingerprint, so for any real deployment point these at your own (ideally private, rotating) images. See Using your own images.

Requirements

Installation

The service provider is auto-discovered. Publish the config, views or translations if you want to tweak them:

Gate data (if you use the gate's IP conditions)

The gate's IP conditions (Tor, datacenter, VPN, country) need their data downloaded first. Run this once after install, and on every deploy:

Wire it into your deploy and schedule it so the data stays fresh:

This is only needed for the gate's IP/country conditions; a plain captcha in your own form does not need it.

Usage

In your own form

Validate on submit with the rule:

As a standalone page

On failure, re-render with a fresh captcha and a message:

As a full-page gate (queue + captcha)

Put a gate in front of any route with the captcha.gate middleware:

The gate has a lot of options: an optional waiting queue, who has to pass it (VPN / Tor / datacenter / blocklists / AbuseIPDB) with an SEO-safe good-bot bypass, pluggable list storage and VPN detection, lifecycle events, and DDoS notes. It is all on its own page: The gate.

Using the manager directly

The same captcha works as a website entry gate and as a form-submit check at the same time; they share the manager, config and events.

Using your own images

The rotate, slider, tiles and grid challenges draw from an image pool, and broken_circle can use background photos. Pointing a challenge at your own folder replaces the bundled demo set, so in production you control the whole thing.

The bundled images are demo material only. For which config key each challenge uses, accepted formats, recommended sizes, how many to add and how to optimise them, see the custom images guide.

Documentation

Changelog

See CHANGELOG.md for what has changed recently.

Contributing

See CONTRIBUTING.md for the workflow: Conventional Commits, pull requests, keeping all language files in sync, using __() for every user-facing string, and the accessibility rules.

Security

If you discover a security issue, please review our security policy and report it privately by email rather than opening a public issue.

Credits

License

The MIT License (MIT). See LICENSE.md for details.


All versions of laravel-captchas with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-gd Version *
geoip2/geoip2 Version ^2.13|^3.0
guzzlehttp/guzzle Version ^7.5
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
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 joshuavanderpoll/laravel-captchas contains the following files

Loading the files please wait ...