PHP code example of teqbylyte / bims-connect

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

    

teqbylyte / bims-connect example snippets


'bims' => [
    'client_id' => env('BIMS_CLIENT_ID'),
    'client_secret' => env('BIMS_CLIENT_SECRET'),
    'redirect' => 'https://yoursite.com/callback-url',
],

use Teqbylyte\BimsConnect\BimsConnect;

// Instead of Socialite::driver('bims'), use:
BimsConnect::init()

// Illustration 1:
Route::get('/oauth/redirect', function () {
    return BimsConnect::init()->redirect();
});
 
// Illustration 2:
Route::get('/oauth/callback', function () {
    $user = BimsConnect::init()->user();
 
    // $user->getEmail()
});