Excited to share my first Laravel package - SafeName!
As a Laravel dev, I've often needed to prevent users from registering with reserved usernames like "admin" or "moderator". On platforms like this one, this is crucial to avoid impersonation and maintain trust.
SafeName makes this easy by providing both exact matching ("admin") and partial matching (blocking "admin123", "superadmin", etc.). I've included a curated list of commonly abused terms, but you can easily customize it for your needs.
Check it out on Packagist:
packagist.org/packages/quebecstudio/safename
Let me know what you think! Always open to feedback and contributions 🙌
(Yes, I developed this with in mind exactly the observations we made today...)
Back
•
In response to @HungryBus
Haha, yes! I hesitated to provide all the gods' names, but I finally decided to leave it up to the users to configure it as they prefer.