Data Transfer Objects (DTOs) in PHP
Lets say, we have a news website and we want to display news which are nearby to the user. First we need to get the user’s location via an API and then pass it to the database query. We can use the API from https://ip-api.com
class IpApi{
public ...
blog.mayankjani.com4 min read