generate random string with rules in php unit faker code example Example: string and number laravel faker $this->faker->bothify('?###??##') // 1efr38qa