Best way to generate a UUID in the laravel framework #54523
Answered
by
NielsPrins
nielsprinsfps
asked this question in
General
-
What is the best way to generate a random UUID? |
Beta Was this translation helpful? Give feedback.
Answered by
NielsPrins
Feb 8, 2025
Replies: 2 comments 1 reply
-
You can use this.
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nielsprinsfps
-
Just use If you need other UUID versions, you can use |
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
You can use this.
It uses random bytes and puts them in the right positions by using the vsprintf function.
Random bytes