rexlabsio / smokescreen-laravel-php

Library for integrating the Smokescreen transformation library with the Laravel framework
MIT License
4 stars 1 forks source link

Add inject() to inject meta/data into the payload output #12

Closed jodiedunlop closed 6 years ago

jodiedunlop commented 6 years ago

Feature: data injection

Provides an inject($key, $data) method which makes it possible to add injections which will be included in the final transformed payload when the transformation process occurs. This makes it simple to add additional meta data to your payload for additional properties that do not usually belong in your transformer.

Note that $key supports dot-notation for depth based properties. The full path will be automatically created as needed.