Files
water_new/app/Admin/Extensions/FormQrCode.php
2023-03-08 09:16:04 +08:00

21 lines
442 B
PHP

<?php
namespace App\Admin\Extensions;
use Encore\Admin\Form\Field;
class FormQrCode extends Field
{
protected $view = 'admin.form.qr_code';
public function render()
{
$google2fa = app('pragmarx.google2fa');
$this->value = $google2fa->getQRCodeUrl(
$this->data['username'],
$this->data['name'],
$this->data['g2fa_secret']
);
return parent::render();
}
}