class TokenResource extends JsonResource
{
/**
*
@apiDefine TokenResource
*
*
@apiSuccess {String="Bearer"} token_type The access token type
*
@apiSuccess {Number} expires_in The access token expire time
*
@apiSuccess {String} access_token The access token
*/
public function toArray($request)
{
return [
'token_type' => 'Bearer',
'expires_in' => $this->token->expires_in,
'access_token' => $this->accessToken,
];
}
}