Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

offender's avatar

Game Pricing via API's with polymorphic matching

Hi All,

I am new to Laravel but I have been a PHP developer for over 10 years so I am really just looking for advice on setup and guidance of my new project which is around Video Game Pricing similar to pricecharting.com however hopefully with more country specific pricing.

My aim is to get this running in the background without user interactions therefore I have seen Laravel commands is the way to go. I will have multiple API services that my system will connect to, this is to get latest prices from various sources and then aggregate the data to show trends and historical pricing per country / region.

With this in mind I want to be able to have a DB setup to handle different API services with different calls and review all items within that call.

I have 3 tables setup so far

services (each service API I use) service_calls (a call to the API service) service_call_items (each item return from the service call)

This seems to work well then I need to match these to the correct Model so I have made a service_matchable model and migration that is going down the polymorphic route. I need to now match these to a game for a platform, that may be a certain edition (could be a deluxe or special edition of a game), along with a condition of the game.

If anyone has any ideas of how to set this up in code and DB that would be very helpful any and all ideas welcome.

Cheers Phil

0 likes
0 replies

Please or to participate in this conversation.