PHP code example of deko96 / auth-gg-laravel

1. Go to this page and download the library: Download deko96/auth-gg-laravel 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/ */

    

deko96 / auth-gg-laravel example snippets


return [
    'authorization' => env('AUTHGG_AUTHORIZATION', ''),
    'secret' => env('AUTHGG_SECRET', ''),
    'aid' => env('AUTHGG_AID', ''),
    'apikey' => env('AUTHGG_API_KEY', '')
];
bash
php artisan vendor:publish --provider="Deko96\AuthGG\AuthGGServiceProvider" --tag="config"
 php
use Deko96\AuthGG\AuthGG;

class SomeController extends Controller {
    // ...
    
    public function index(AuthGG $authGG) {
        $adminAPI = $authGG->admin();
        $universalAPI = $authGG->universal();
        
        // Users - https://setup.auth.gg/admin/users
        $users = $adminAPI->users([
            'type' => 'fetchall'
        ]);
        
        // The rest of the examples coming soon.
    }
    // ...
}