PHP code example of thecodework / two-factor-authentication
1. Go to this page and download the library: Download thecodework/two-factor-authentication 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/ */
thecodework / two-factor-authentication example snippets
[
'providers' => [
//...
Thecodework\TwoFactorAuthentication\TwoFactorAuthenticationServiceProvider::class
]
]
use AuthenticatesUsers, AuthenticatesUsersWith2FA {
AuthenticatesUsersWith2FA::authenticated insteadof AuthenticatesUsers;
}
bash
$ php artisan migrate
$ php artisan vendor:publish --provider="Thecodework\TwoFactorAuthentication\TwoFactorAuthenticationServiceProvider"