for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file implements Base.
*
* @author Bilal Gultekin <[email protected]>
* @author Justin Hartman <[email protected]>
* @copyright 2019 22 Digital
* @license MIT
* @since v0.1
*/
namespace TwentyTwoDigital\CashierFastspring\Listeners;
* This class describes a base.
class Base
{
* Get the billable entity instance by Fastspring ID.
* @param string $fastspringId
* @return \TwentyTwoDigital\CashierFastspring\Billable
public function getUserByFastspringId($fastspringId)
$model = getenv('FASTSPRING_MODEL') ?: config('services.fastspring.model');
return (new $model())->where('fastspring_id', $fastspringId)->first();
}