A simple class for generating random strings.
use Didatus\RandomString\RandomString;
$randomString = new RandomString();
use Didatus\RandomString\RandomString;
$randomString = new RandomString('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1IO0');
Excluding characters can be helpful for generating readable coupons (without confusing 0 and O for example).
$randomString = new RandomString();
$string = $randomString->getString(10);
$randomString = new RandomString('0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1IO0');
$string = $randomString->getString(10);
$randomString = new RandomString();
$strings = $randomString->getListOfString(10, 5);
C8H5