src/Laravel/LaravelOAuthBridge.php
public function persistClientToken($clientId, $accessToken, $expiration, $role)
    {
        /** @var \Illuminate\Database\Query\Builder $table */
        $table = app('db')->connection()->table('clients');

        // If the record doesn't already exist, add it.
        if (! $table->where(['client_id' => $clientId])->exists()) {
            $table->insert(['client_id' => $clientId]);
        }

        // Update record with the new access token & expiration.
        $table->where(['client_id' => $clientId])->update([
            'access_token' => $accessToken,
            'access_token_expiration' => $expiration,
        ]);
    }
public function persistClientToken($clientId, $accessToken, $expiration, $role)
    {
        /** @var \Illuminate\Database\Query\Builder $table */
        $table = app('db')->connection()->table('clients');

        // If the record doesn't already exist, add it.
        if (! $table->where(['client_id' => $clientId])->exists()) {
            $table->insert(['client_id' => $clientId]);
        }

        // Update record with the new access token & expiration.
        $table->where(['client_id' => $clientId])->update([
            'access_token' => $accessToken,
            'access_token_expiration' => $expiration,
        ]);
    }
public function persistClientToken ( $ clientId , $ accessToken , $ expiration , $ role ) { /** @var \Illuminate\Database\Query\Builder $table */ $ table = app ( 'db' ) -> connection ( ) -> table ( 'clients' ) ; // If the record doesn't already exist, add it. if ( ! $ table -> where ( [ 'client_id' => $ clientId ] ) -> exists ( ) ) { $ table -> insert ( [ 'client_id' => $ clientId ] ) ; } // Update record with the new access token & expiration. $ table -> where ( [ 'client_id' => $ clientId ] ) -> update ( [ 'access_token' => $ accessToken , 'access_token_expiration' => $ expiration , ] ) ; }
Save the access token for an authorized client.

@param $clientId - OAuth client ID
@param $accessToken - Encoded OAuth access token
@param $expiration - Access token expiration as UNIX timestamp
@return void
Save the access token for an authorized client .