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

Add uuid generator #12

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Add uuid generator #12

merged 1 commit into from
Mar 6, 2024

Conversation

rawilk
Copy link
Owner

@rawilk rawilk commented Mar 6, 2024

PR adds a new UuidGenerator for generating ids with. This generator will use Laravel's Str::uuid() to generate a new id, and replace all - characters with an empty space.

An example id will look like: abc_b8a34e34553a41b885ae218ae81abd42

This generator will also remove the requirement to pull in an additional package to generate ids, as long as you set the config value to the new generator.

@rawilk rawilk added the enhancement New feature or request label Mar 6, 2024
@rawilk
Copy link
Owner Author

rawilk commented Mar 6, 2024

Also, as a note, this generator is inspired by how Spatie generates their ids by default in the spatie/laravel-prefixed-ids package.

@rawilk rawilk merged commit d948302 into main Mar 6, 2024
22 checks passed
@rawilk rawilk deleted the feature/uuid-generator branch March 6, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant