laravel / blog-contest-may-mayhem

242 stars 16 forks source link

APIs The Eloquent Way - A Package To Consume Third Party APIs Like A Database. Models, Relations, Method Chaining And More #65

Open oheck opened 6 years ago

oheck commented 6 years ago

https://blackbits.io/blog/apis-the-eloquent-way

RemiCollin commented 6 years ago

Interesting subject. For the Active Record part, if you did not already, you should read this series of posts

simonhamp commented 6 years ago

This is a really interesting take on a problem I've also tried to tackle.

I approached it slightly differently, using a kind of Eloquent Model (called a Resource) that's been adapted to replace calls to a DB with a generic GuzzleHttp client instance.

I haven't quite tackled all of the areas of concern that this covers though. Plus it feels much nicer to be able to distinguish which API client-model combo is the target by declaring it explicitly during invocation... that would make working with multiple APIs a lot easier!

Great work!

ananasili commented 6 years ago

https://i.imgur.com/M7FFyuW.gif

dswagner94 commented 6 years ago

Very nice Work!