PHP code example of nicolasbeauvais / laravel-botscout

1. Go to this page and download the library: Download nicolasbeauvais/laravel-botscout library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nicolasbeauvais / laravel-botscout example snippets


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

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

BotScout::multi('John Doe', '[email protected]', '127.0.0.1')->isValid();

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

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

BotScout::mail('[email protected]')->isValid();

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

// We also 

// Create a classic validation 
$validator = Validator::make($request->all(), [
    'email' => 'ut::check($request->get('name'), $request->get('email'), $request->ip())) {
        $validator->errors()->add('email', 'Sorry, it looks like your a bot!');
    }
});
bash
php artisan vendor:publish --provider="NicolasBeauvais\LaravelBotScout\BotScoutServiceProvider" --tag="config"