Replies: 1 comment
-
Thanks for your proposal. I'd rather have a more flexible solution. We could give users the possibility of passing a closure that returns the unique part of the id. In usage it could look like this.
Users can this way return unique parts of any length they desire. I'd accept a PR that adds this. Make sure to update the readme and include tests. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would you be open to being able to set the length of the IDs for the prefixed ID in the
config/prefixed_ids.php
?By default in the config.php it would be set to:
If an integer is set for
prefixed_id_length
thegetUniquePartForPrefixId()
method would be updated to:We could even setup an exception to check to make sure the
prefixed_id_length
> 8 so the risk of collision is less likely.Just opening the conversation because for some of the models with prefixed_ids I would like to use them as short urls,
https://example.com/l/camp_3b3ka5k48
.Thank you for the consideration.
Beta Was this translation helpful? Give feedback.
All reactions