This commit is contained in:
mathiaspalmqvist committed 2026-11-11 23:19:20 +01:00
commit 3ed6eb9d19
23 files changed
+1216

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<?php
namespace Mattitja\BadIpBlocker\Console;
use Illuminate\Console\Command;
use Mattitja\BadIpBlocker\BadIpStore;
class RemoveCommand extends Command
{
protected $signature = 'bad-ip-blocker:remove {ip : The IP address to unblock}';
protected $description = 'Unblock an IP address';
public function handle(BadIpStore $store): int
{
$ip = $this->argument('ip');
if (! $store->unblock($ip)) {
$this->components->warn("[{$ip}] was not blocked.");
return self::FAILURE;
}
$this->components->info("Unblocked [{$ip}].");
return self::SUCCESS;
}
}