Skip to content

Commit

Permalink
Update cache on unban expired command
Browse files Browse the repository at this point in the history
  • Loading branch information
mchev committed Feb 21, 2023
1 parent bb2960e commit f567e72
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Banhammer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

namespace Mchev\Banhammer;

use Illuminate\Support\Facades\Cache;
use Mchev\Banhammer\Models\Ban;

class Banhammer
{
public static function unbanExpired(): void
{
Ban::expired()->delete();
Cache::put('banned-ips', IP::banned()->pluck('ip')->toArray());
}

public static function clear(): void
Expand Down

0 comments on commit f567e72

Please # to comment.