I need to store to DB the code which is 8 characters and unique
Now my solution is $code = Str::random(8).
But Str::random is not unique at all, so I need to check before to create.
Can I have better solution? Thanks in advance
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!