PHP code example of potelo / laravel-block-bots

1. Go to this page and download the library: Download potelo/laravel-block-bots 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/ */

    

potelo / laravel-block-bots example snippets


protected $routeMiddleware = [
    // ...
    'block' => \Potelo\LaravelBlockBots\Middleware\BlockBots::class,
];

protected $middlewareGroups = [
    'web' => [
        // ...
        \App\Http\Middleware\VerifyCsrfToken::class,
        'block:100,daily', // 100 requests per day.
    ],
];

php artisan vendor:publish --provider="Potelo\LaravelBlockBots\BlockBotsServiceProvider"