Abraxas is very simple PHP library for generating random passwords using a cryptographically secure RNG.
composer require icecave/abraxas
$generator = new Icecave\Abraxas\PasswordGenerator;
$generator->setMinimumLength(6);
$generator->setMaximumLength(10);
$generator->setAllowAmbiguousCharacters(false);
$password = $generator->generate();