PHP code example of revolution / socialite-freee

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

    

revolution / socialite-freee example snippets


namespace App\Http\Controllers;

use Laravel\Socialite\Facades\Socialite;

class LoginController extends Controller
{
    public function redirect()
    {
        return Socialite::driver('freee-accounting')->redirect();
    }

    public function callback()
    {
        $user = Socialite::driver('freee-accounting')->user();
        dd($user);
    }
}