PHP code example of socialiteproviders / whmcs

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

    

socialiteproviders / whmcs example snippets


'whmcs' => [
    'client_id' => env('WHMCS_CLIENT_ID'),
    'client_secret' => env('WHMCS_CLIENT_SECRET'),
    'redirect' => env('WHMCS_REDIRECT_URI'),
    'url' => env('WHMCS_URL'), // URL of your WHMCS installation
],

Event::listen(function (\SocialiteProviders\Manager\SocialiteWasCalled $event) {
    $event->extendSocialite('whmcs', \SocialiteProviders\Whmcs\Provider::class);
});

protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // ... other providers
        \SocialiteProviders\Whmcs\WhmcsExtendSocialite::class.'@handle',
    ],
];

return Socialite::driver('whmcs')->redirect();

$user = Socialite::driver('whmcs')->user();

$locale = $user->user['locale'];
$email_verified = $user->user['email_verified'];