PHP code example of molbal / eveonline-socialite

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

    

molbal / eveonline-socialite example snippets


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

$token = $user->token;
$expiresIn = $user->expiresIn;
$user->getId();
$user->getName();
$user->getAvatar();



namespace App\Http\Controllers\Auth;

use Socialite;

class AuthController extends Controller
{
    /**
     * Redirect the user to the Eve Online authentication page.
     *
     * @return Response
     */
    public function redirectToProvider()
    {
        return Socialite::driver('eveonline')->redirect();
    }

    /**
     * Obtain the user information from Eve Online.
     *
     * @return Response
     */
    public function handleProviderCallback()
    {
        $user = Socialite::driver('eveonline')->user();

        //dd($user);
    }
}