src/Judopay.php
public function getModel($modelName)
    {
        // If the model is already defined in the container, just return it
        if (isset($this->container[$modelName])) {
            return $this->get($modelName);
        }

        // Set up the model in the DI container
        $request = $this->get('request');
        $this->container[$modelName] = $this->container->factory(
            function () use ($modelName, $request) {
                $modelClassName = '\Judopay\Model\\'.ucfirst($modelName);

                return new $modelClassName($request);
            }
        );

        return $this->get($modelName);
    }
public function getModel($modelName)
    {
        // If the model is already defined in the container, just return it
        if (isset($this->container[$modelName])) {
            return $this->get($modelName);
        }

        // Set up the model in the DI container
        $request = $this->get('request');
        $this->container[$modelName] = $this->container->factory(
            function () use ($modelName, $request) {
                $modelClassName = '\Judopay\Model\\'.ucfirst($modelName);

                return new $modelClassName($request);
            }
        );

        return $this->get($modelName);
    }
Build a new model object
@param string $modelName
@return object