matt-daneshvar/eloquent-hashids
Laravel package that adds Hashids support to Eloquent models, hiding auto-increment IDs behind short, reversible hashes. A trait encodes route keys and resolves models from hashids, keeping URLs clean and database IDs private with minimal setup.
/orders/AbC123 instead of /orders/1042, while preserving internal integer primary keys.Consider it when:
Look elsewhere when:
For executives: This is a low-cost utility to make public-facing record IDs shorter and less revealing than sequential database IDs. It can improve URL aesthetics and reduce casual data enumeration, but it is not a security feature. Because the package is archived and last released in 2019, I would not recommend adopting it as a long-term strategic dependency; if we want this behavior, we should treat it as a small internal pattern we own.
For engineering: The package auto-generates and persists Hashids for new Eloquent models. If we use it, we should verify Laravel/PHP compatibility, add a unique indexed hashid column, backfill existing records, define salt management, and test collision/rotation behavior. We must explicitly avoid using hashids for authorization or secrecy. Given the maintenance status, the safer path may be to copy the minimal trait behavior into our codebase or choose UUIDs/ULIDs if unguessability matters.
How can I help you explore Laravel packages today?