Closed keithmancuso closed 6 years ago
You could either do that, define the class right in your config/element-api.php
file, or create a src/
directory at the root of your project and put it in there with some project-specific namespace (e.g. myproject
), and configure your project’s composer.json to autoload classes within that namespace using the autoload
config setting.
I see in the docs how to write one, and how to use one in the config file but im a little confused on how to load the transformer class into the element api's config file?
currently i have it working by adding this to the top of the element-api.php config file, is this the right way?