davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
349 stars 341 forks source link

How to convert response type to array so that it can be populated correctly later? #237

Closed izshreyansh closed 5 years ago

izshreyansh commented 5 years ago

I'm trying to save this whole object in Cache for later use.

Can anyone help please?

Originally posted by @shreyanshpanchal in https://github.com/davidtsadler/ebay-sdk-php/issues/1#issuecomment-444857294

izshreyansh commented 5 years ago

I am really sorry, I just assumed that toArray() was a Laravel function. I know that is so stupid to think.



// Cache the values of the response object.
// toArray returns an assoicated array of the response object properties.
Cache::put($key,$results->toArray(),24*60); ```

Everything is working as it should.