darvis/livewire-injection-stopper
Install the package using Composer:
composer require darvis/livewire-injection-stopper
The package will automatically register itself via Laravel's package discovery.
Optionally, publish the configuration file to customize settings:
php artisan vendor:publish --tag=livewire-injection-stopper-config
This creates config/livewire-injection-stopper.php where you can customize:
Verify the installation by running the security audit:
php artisan livewire-injection-stopper:audit
The middleware is automatically applied to all web routes and will start blocking spam bots immediately.
If your app overrides report() in app/Exceptions/Handler.php and manually calls Sentry, make sure you skip reporting for silenced bot exceptions.
Example:
use Darvis\LivewireInjectionStopper\Exceptions\SilentExceptionHandler;
public function report(Throwable $exception)
{
if (config('livewire-injection-stopper.silence_locked_property_exceptions', true)
&& SilentExceptionHandler::shouldSilence($exception)) {
SilentExceptionHandler::handle($exception);
return;
}
parent::report($exception);
}
How can I help you explore Laravel packages today?