Level 70
If you don't have to have 5 slice of your string, you may use uuid.
Is there an easy way to change this:
Str::random(20) // e.g 4O3i7JDV9Em6qSqtL1SH
into this:
4O3i-7JDV-9Em6-qSqt-L1SH
probably less work to concatenate 4 x 4 letter strings
$code = sprintf('%s-%s-%s-%s', str::random(4), str::random(4), str::random(4), str::random(4));
Edit: (or 5! You get the idea)
I would probably make it all lowercase also
Please or to participate in this conversation.