Giter Club home page Giter Club logo

Comments (7)

flugg avatar flugg commented on August 14, 2024

Hey Brian! I like the idea and it was something I considered when I first created the package. The only downside I can see is that people would have to manually create the service provider and copy/paste the boilerplate from the documentation. Not sure what I like the most, but it could potentially be an alternative way of registering transformers.

from laravel-responder.

faustbrian avatar faustbrian commented on August 14, 2024

Well currently you need to add a transformer method to each provider so I think creating a service provider once and adding a line there is the same amount of work, just keeps things a bit cleaner I think.

from laravel-responder.

flugg avatar flugg commented on August 14, 2024

I agree with you that it's easier, but we would lose the possibility to add simple closure transformers in the models:

public static function transformer() {
    return function($model) { return [ ... ]; }
}

I'll give this some more thought, but do appreciate the idea

from laravel-responder.

faustbrian avatar faustbrian commented on August 14, 2024

from laravel-responder.

faustbrian avatar faustbrian commented on August 14, 2024

@Flugger will the v2 get a release tag soon? About to deploy an application and could clean it up a bit with the new TransformerManager.

from laravel-responder.

flugg avatar flugg commented on August 14, 2024

Hey! Yeah, Just fixing the last bugs and increasing test coverage slightly, but should be out next week is my bet.

from laravel-responder.

faustbrian avatar faustbrian commented on August 14, 2024

Will close this issue then. Thanks.

from laravel-responder.

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.