PHP code example of nerbiz / crawl-shield
1. Go to this page and download the library: Download nerbiz/crawl-shield 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/ */
nerbiz / crawl-shield example snippets
// Option 1: Shield all routes
protected $middleware = [
// ...
\Nerbiz\CrawlShield\Middleware\CrawlShieldMiddleware::class,
];
// Option 2: Shield only specific route group(s)
protected $middlewareGroups = [
'web' => [
// ...
\Nerbiz\CrawlShield\Middleware\CrawlShieldMiddleware::class,
],
// ...
];
// Option 3: Custom usage in your routes/ directory
protected $middlewareAliases = [
// ...
'crawl-shield' => \Nerbiz\CrawlShield\Middleware\CrawlShieldMiddleware::class,
];
sh
php artisan vendor:publish --tag=crawl-shield