marcreichel / igdb-laravel

Simplify the integration of the IGDB API into your Laravel app. Including IGDB webhook support.
https://marcreichel.dev/docs/igdb-laravel
MIT License
104 stars 22 forks source link

Add Arrayable and Jsonable interface to Model #7

Closed Andrew-Shook closed 5 years ago

Andrew-Shook commented 5 years ago

Added the interfaces to the Model to make it easier to transform collections to arrays or json. Updated the toJson method to call toArray. This reduces code, since the previous method used the same map function as toArray but called toJson instead. Also changed the toJson method signature to conform to the interfaces method signature.