Skip to content

Instantly share code, notes, and snippets.

@basherr
Last active June 4, 2021 07:38
Show Gist options
  • Save basherr/46f0522ea4377c930c747db89c5a2b0f to your computer and use it in GitHub Desktop.
Save basherr/46f0522ea4377c930c747db89c5a2b0f to your computer and use it in GitHub Desktop.
<?php
namespace App\ApiModels;
use App\Traits\CanAccessProperties;
/**
* class BaseApiModel
*
* The base class for all the models
*
* @package App\ApiModels
*/
abstract class BaseApiModel
{
use CanAccessProperties;
/**
* Create an object from API response
*
* @param mixed $incoming
* @return mixed
*/
abstract public function hydrate($incoming);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment