uri, 0, 15 ) === "otpauth://totp/" ? 'totp' : 'hotp'; } /** * Get the account counter in case of HOTP. * * @return integer */ public function getCounterAttribute() { if( $this->type === 'hotp' ) { $otp = Factory::loadFromProvisioningUri($this->uri); return $otp->getCounter(); } return null; } /** * Set the user's first name. * * @param string $value * @return void */ // public function setUriAttribute($value) // { // $this->attributes['uri'] = encrypt($value); // } /** * Get the user's first name. * * @param string $value * @return string */ // public function getUriAttribute($value) // { // try { // return decrypt($value); // } catch (DecryptException $e) { // return null; // } // } }