PHPackages                             nicolasbeauvais/laravel-botscout - 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. nicolasbeauvais/laravel-botscout

AbandonedArchivedLibrary[Security](/categories/security)

nicolasbeauvais/laravel-botscout
================================

botscout.com protection for laravel

v1.2.0(7y ago)693.5k6MITPHPPHP ^7.0

Since Feb 13Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nicolasbeauvais/laravel-botscout)[ Packagist](https://packagist.org/packages/nicolasbeauvais/laravel-botscout)[ Docs](https://github.com/nicolasbeauvais/laravel-botscout)[ RSS](/packages/nicolasbeauvais-laravel-botscout/feed)WikiDiscussions master Synced yesterday

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

Laravel BotScout
================

[](#laravel-botscout)

[![Latest Version on Packagist](https://camo.githubusercontent.com/dab732778b88cac068475589000ce9b7858bec154247549412bec362d4ceed02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e69636f6c617362656175766169732f6c61726176656c2d626f7473636f75742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicolasbeauvais/laravel-botscout)[![Build Status](https://camo.githubusercontent.com/fc01bf57512b03f5f2379578e9206990a43911724b959978be2d198b8473cfb4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6e69636f6c617362656175766169732f6c61726176656c2d626f7473636f75742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/nicolasbeauvais/laravel-botscout)[![SensioLabsInsight](https://camo.githubusercontent.com/c2d710cdf63416f24d5ca2064417c478966a4ec923726b53ce64ce3b95abb26d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30303536323066382d643135342d343166312d626339622d3463323761316366333661622f6d696e692e706e67)](https://insight.sensiolabs.com/projects/005620f8-d154-41f1-bc9b-4c27a1cf36ab)[![Quality Score](https://camo.githubusercontent.com/117c9ca19de8e8fa4c02dbf433a1bc67d819d33e15da3829adef03274653d336/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6e69636f6c617362656175766169732f6c61726176656c2d626f7473636f75742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/nicolasbeauvais/laravel-botscout)[![Total Downloads](https://camo.githubusercontent.com/8da71e2f80d39e68758991e87864bfc0eff69b2d7f64e041bcb3c0adbea69896/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e69636f6c617362656175766169732f6c61726176656c2d626f7473636f75742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nicolasbeauvais/laravel-botscout)

[![bs_logo_full](https://cloud.githubusercontent.com/assets/2951704/22866541/8c6ddd80-f178-11e6-8a94-ded54a0b109a.gif)](https://cloud.githubusercontent.com/assets/2951704/22866541/8c6ddd80-f178-11e6-8a94-ded54a0b109a.gif)

Protect your website against automated scripts using the [botscout.com](http://botscout.com/) API.

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

[](#installation)

You can install the package via composer:

```
composer require nicolasbeauvais/laravel-botscout
```

Next, you must install the service provider:

```
// config/app.php
'providers' => [
    ...
    NicolasBeauvais\LaravelBotScout\BotScoutServiceProvider::class,
];
```

Add your [botscout.com](http://botscout.com/getkey.htm) api key to the `.env` file:

```
BOTSCOUT_SECRET=your-api-key
```

If needed you can also publish the config file:

```
php artisan vendor:publish --provider="NicolasBeauvais\LaravelBotScout\BotScoutServiceProvider" --tag="config"
```

If you want to make use of the facade you must install it as well:

```
// config/app.php
'aliases' => [
    ...
    'BotScout' => NicolasBeauvais\LaravelBotScout\BotScoutFacade::class,
];
```

Usage
-----

[](#usage)

You are highly advised to read the [BotScout.com API guide](http://botscout.com/api.htm) to understand the meaning of each method.

### Validator

[](#validator)

You can easily use botscout in your existing validators:

```
// Validate name
$validator = Validator::make(['name' => 'John Doe'], [
  'name' => 'required|botscout_name'
]);

// Validate email
$validator = Validator::make(['email' => 'toto@gmail.com'], [
  'email' => 'required|botscout_mail'
]);

// Validate ip
$validator = Validator::make(['ip' => '127.0.0.1'], [
  'ip' => 'required|botscout_ip'
]);
```

Note that you will need to create the validation message by yourself, as described in the [Laravel documentation](https://laravel.com/docs/5.5/validation#custom-error-messages).

### Facade

[](#facade)

You can use the BotScout facade anywhere in your app:

```
BotScout::multi('John Doe', 'email@test.com', '127.0.0.1')->isValid();

BotScout::all('John Doe')->isValid();

BotScout::name('John Doe')->isValid();

BotScout::mail('email@test.com')->isValid();

BotScout::ip('127.0.0.1')->isValid();

// We also include a quick way of testing a user with integrated exception catch
BotScout::check('John Doe', 'email@test.com', '127.0.0.1'); // true or false
```

### Real life example using the check method

[](#real-life-example-using-the-check-method)

The `check` method is the recommended way to validate a register form:

> The `check` method is a wrapper to the `multi`method that catch any http error / timeout. If the botscout api is not responding, the method will return false.

```
// Create a classic validation
$validator = Validator::make($request->all(), [
    'email' => 'required|email|unique:users',
    'name' => 'required|max:20',
]);

$validator->after(function ($validator) {
    if (!BotScout::check($request->get('name'), $request->get('email'), $request->ip())) {
        $validator->errors()->add('email', 'Sorry, it looks like your a bot!');
    }
});
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Nicolas Beauvais](https://github.com/nicolasbeauvais)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

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

Total

4

Last Release

2581d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b6066ead65db8768cca2c6c5d2312e5f9af8e564ceb2971bb33e30d58bd280e?d=identicon)[nicolasbeauvais](/maintainers/nicolasbeauvais)

---

Top Contributors

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

---

Tags

botbotscoutlaravellaravel-packagephpprotectionlaravelbotprotectionbotscout

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nicolasbeauvais-laravel-botscout/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M284](/packages/laravel-horizon)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M169](/packages/laravel-ai)[laravel/socialite

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

5.7k108.5M846](/packages/laravel-socialite)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M131](/packages/laravel-mcp)[laravel/sail

Docker files for running a basic Laravel application.

1.9k199.2M1.2k](/packages/laravel-sail)

PHPackages © 2026

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