use Cachesistemas\GoogleAuthenticator;
include_once 'vendor/autoload.php';
$ga = new GoogleAuthenticator():
$secret = $ga->createSecret();
$qrCode = $ga->getQRCodeGoogleUrl("<email>", $secret,"<NAME>");
$check = $ga->verifyCode($secret, "<code>", 2);