PHP code example of ghost / google-authenticator

1. Go to this page and download the library: Download ghost/google-authenticator 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/ */

    

ghost / google-authenticator example snippets


'google-authenticator'=> [
    'enable' => true,
    'authenticatorname' => '' //名称 
],

namespace App\Admin\Controllers;

use Ghost\GoogleAuthenticator\Http\Controllers\AuthController as BaseAuthController;