PHP code example of dusterio / laravel-google-guard
1. Go to this page and download the library: Download dusterio/laravel-google-guard 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/ */
'guards' => [
/// Your existing guards
/// ...
'google' => [
/*
* For consistency, return a dummy (not persisted) class holder.
*/
'userClass' => '\App\User',
/*
* Remember users for this number of seconds.
*/
'timeout' => 3600,
/*
* Users that can use the app. If left empty, everybody is allowed.
*/
'whitelist' => [
'admin@.',
]
]
]