GithubHelp home page GithubHelp logo

Comments (6)

ipalaus avatar ipalaus commented on July 16, 2024

You can't do it right now, see how the output is generated: https://github.com/thephpleague/fractal/blob/master/src/League/Fractal/Scope.php#L110

from fractal.

philsturgeon avatar philsturgeon commented on July 16, 2024

I definitely want to add a simple way to append meta data to the output, but have not got the time to work on this for a few weeks.

If anyone wants to take a stab at it I certainly wouldn’t be mad. :)

-- 
Phil Sturgeon

On January 23, 2014 at 9:38:13 PM, Martin Dilling-Hansen ([email protected]) wrote:

More a question than an issue I think (hope xD).
But how can I add meta data to the output?

fx. adding a token property like this:

{
"token": "b94hIJINQlPYIz7sOLRXbuMmsOH9KF60",
"data": {
"id": 26,
"email": "[email protected]",
"name": "Test User",
"api_token": null,
"created_at": "2014-01-24 03:34:58",
"updated_at": "2014-01-24 03:34:58"
},
"embeds": [
"games"
]
}

Just adding something "besides" data and embeds?


Reply to this email directly or view it on GitHub.

from fractal.

RSully avatar RSully commented on July 16, 2024

👍

from fractal.

jasonlewis avatar jasonlewis commented on July 16, 2024

What if a Transformer included a meta method that could return an array of meta data that would simply be merged with the top level?


Just thinking. Would meta data be applicable to embeddable data or should it always go to the top level?

from fractal.

philsturgeon avatar philsturgeon commented on July 16, 2024

@jasonlewis that certainly seems logical enough. :)

from fractal.

philsturgeon avatar philsturgeon commented on July 16, 2024

This conversation will continue over on #45. Thanks everyone. :)

from fractal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.