1. Go to this page and download the library: Download abuseipdb/laravel 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/ */
namespace App\Exceptions;
use AbuseIPDB\AbuseIPDBExceptionReporter;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Symfony\Component\HttpFoundation\Exception\SuspiciousOperationException;
use Throwable;
class Handler extends ExceptionHandler
{
// ...
public function register(): void
{
$this->stopIgnoring(SuspiciousOperationException::class);
$this->reportable(function (Throwable $e) {
if ($e instanceof SuspiciousOperationException) {
AbuseIPDBExceptionReporter::reportSuspiciousOperationException();
}
});
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.