PHP code example of laraviet / backpack2fa
1. Go to this page and download the library: Download laraviet/backpack2fa library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laraviet / backpack2fa example snippets
php artisan migrate
php artisan vendor:publish --provider=PragmaRX\\Google2FALaravel\\ServiceProvider
public function setGoogle2faSecretAttribute($value)
{
$this->attributes['google2fa_secret'] = encrypt($value);
}
public function getGoogle2faSecretAttribute($value)
{
return decrypt($value);
}