Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request]: Expiration date for banned IPs #10

Closed
olivierbaudouin opened this issue Dec 23, 2023 · 3 comments
Closed

[feature request]: Expiration date for banned IPs #10

olivierbaudouin opened this issue Dec 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@olivierbaudouin
Copy link

What happened?

Is it possible to add expiration date for banned IPs?

How to reproduce the bug

Is it possible to add expiration date for banned IPs?

Package Version

last

PHP Version

8.1

Laravel Version

10

Which operating systems does with happen with?

Linux

Notes

No response

@olivierbaudouin olivierbaudouin added the bug Something isn't working label Dec 23, 2023
@mchev
Copy link
Owner

mchev commented Dec 24, 2023

It is possible to set an expiration date if the banned IP is associated with a model. Is that what you're looking for?

$model->ban([
	'ip' => "8.8.8.8",
	'expired_at' => now()->addDays(7),
]);

Otherwise, indeed, on the IP class, it's not possible to define an expiration date. It's a good idea for a future version.

@olivierbaudouin
Copy link
Author

Yes, for a future version, it would be cool. Thanks.

@mchev
Copy link
Owner

mchev commented Jan 7, 2024

Done in v2.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants