You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just checking out this new package after you told me about it on your Love package.. I'm going to be using both of course :)
I also mentioned I was looking for a tool to handle per-user bans/blocks. To tell you the truth I'm working on a dating site so you can imagine it needs all these functionalities
As soon as I started reading the features of this package, the very first one you mention is "models can have many bans" and immediately in my head I started thinking I could use this not only to handle full-on bans in my application, but I could also use it to handle "reports" in a way.
In the sense that, if one user gets reported for abuse by another user.. then he isn't banned yet, but if 3 users report him, then that converts into a ban
I thought your "many bans" implied that I could set a threshold where the user would only get banned after x number of bans had been applied to it.
Is that not at all what you meant?
It would be nice to write a little more about this mysterious feature that made it to the top of the list =D
Another small thing so I don't create an issue for it.. I'm confused about what you mean in the "Scope auto-apply" section. Do you mean that we have to add the shouldApplyBannedAtScope => true if we want to always apply the withoutBanned() by default on all queries on the bannable model?
Big thanks for putting all this love into these packages of course :) extremely handy and useful!
The text was updated successfully, but these errors were encountered:
We have some kind of projects with functionality you described. They are using Laravel Love & Laravel Ban packages too.
You are right. This package allows Bannable model to have many bans. But it's not designed to be responsible for the Report system. It could be integrated with Report system by utilizing events. When entity has many reports on it - it should be banned. If entity will be unbanned over time or manually - its reports count will be dropped.
The main idea of having multiple ban records is detailed ban history, but additionally it gives ability to:
implement permanent ban in the future when user has more than X bans.
fire some kind of special events which tell that this entity is problematic: "has reached 10 bans for one year".
You are right about scope auto-apply. If this method will return true - all eloquent queries will include condition that model should not be banned by adding $query->whereNull('banned_at') to them. You will have to use withBanned() or onlyBanned() methods to be able to fetch banned records again.
We need to think more about method naming in future for clear understanding what it stands for.
Hi there!
Just checking out this new package after you told me about it on your Love package.. I'm going to be using both of course :)
I also mentioned I was looking for a tool to handle per-user bans/blocks. To tell you the truth I'm working on a dating site so you can imagine it needs all these functionalities
As soon as I started reading the features of this package, the very first one you mention is "models can have many bans" and immediately in my head I started thinking I could use this not only to handle full-on bans in my application, but I could also use it to handle "reports" in a way.
In the sense that, if one user gets reported for abuse by another user.. then he isn't banned yet, but if 3 users report him, then that converts into a ban
I thought your "many bans" implied that I could set a threshold where the user would only get banned after x number of bans had been applied to it.
Is that not at all what you meant?
It would be nice to write a little more about this mysterious feature that made it to the top of the list =D
Another small thing so I don't create an issue for it.. I'm confused about what you mean in the "Scope auto-apply" section. Do you mean that we have to add the shouldApplyBannedAtScope => true if we want to always apply the withoutBanned() by default on all queries on the bannable model?
Big thanks for putting all this love into these packages of course :) extremely handy and useful!
The text was updated successfully, but these errors were encountered: