hexify/laravel-id-customizer
Laravel package for generating custom IDs for models or any table column. Create prefixed incremental IDs (with optional reset on prefix change) or random IDs with configurable length, character set, and extras. Use via a controller helper or a model trait.
STU-2024-00123 for students, ORD-2024-0001 for orders) to improve UX, compliance, or workflows.TENANT-USER-123).ramsey/uuid or vlucas/phpuuid).paragonie/random_compat).*"This lightweight Laravel package lets us generate custom IDs (e.g., ORD-2024-00123) without building from scratch, saving dev time and reducing technical debt. It’s ideal for:
*"Pros:
IdCustomizer::generate(['prefix' => 'STU', 'length' => 10])).HasIdFactory trait to auto-generate IDs on save().date('ym') for year-month), fixed lengths, and custom columns.Cons:
where('uid', '!=', $uid)->exists()).Recommendation:
spatie/uuid (for UUIDs) or roll your own if requirements grow."*How can I help you explore Laravel packages today?