test data
This commit is contained in:
@@ -119,23 +119,22 @@ class Esi {
|
||||
]);
|
||||
//Decode the body of the response which has the token information
|
||||
$body = json_decode($response->getBody(), true);
|
||||
dd($body);
|
||||
//Update the old token, then send the new token back to the calling function
|
||||
EsiToken::where([
|
||||
'character_id' => $charId,
|
||||
])->update([
|
||||
'access_token' => $body->access_token,
|
||||
'refresh_token' => $body->refresh_token,
|
||||
'expires_in' => $body->expires_in,
|
||||
'access_token' => $body['access_token'],
|
||||
'refresh_token' => $body['refresh_token'],
|
||||
'expires_in' => $body['expires_in'],
|
||||
'inserted_at' => time(),
|
||||
]);
|
||||
|
||||
$newToken = new EsiToken;
|
||||
$newToken->character_id = $charId;
|
||||
$newToken->access_token = $body->access_token;
|
||||
$newToken->refresh_token = $body->refresh_token;
|
||||
$newToken->access_token = $body['access_token'];
|
||||
$newToken->refresh_token = $body['refresh_token'];
|
||||
$newToken->inserted_at = time();
|
||||
$newToken->expires_in = $body->expires_in;
|
||||
$newToken->expires_in = $body['expires_in'];
|
||||
|
||||
//Return the new token model
|
||||
return $newToken;
|
||||
|
||||
Reference in New Issue
Block a user