Giter Club home page Giter Club logo

Comments (4)

codivist avatar codivist commented on August 15, 2024

I was able to get this working by having my ApiService extend the AbstractResponse. But I can not use the ::api() portion of it.
Awesome response package! Is there going to be more documentation?

Is there a way to override the codes i.e.const CODE_GONE = 'GEN-GONE'; so I can have the code output Resource Gone instead of GEN-GONE?

from api-response.

maximebeaudoin avatar maximebeaudoin commented on August 15, 2024

If you using laravel, you have to add the EllipseSynergie\ApiResponse\Laravel\ResponseServiceProviderto your app/config/app.php before. The service provider will add the api() macro to the Response facade. You can see the line https://github.com/ellipsesynergie/api-response/blob/master/src/Laravel/ResponseServiceProvider.php#L36

You don't need to add the use EllipseSynergie\ApiResponse\Laravel\Response;. You will directly use the default Response facade.

from api-response.

maximebeaudoin avatar maximebeaudoin commented on August 15, 2024

For the installation process, i think the documentation convert all the process. However, i should probably add some documentation about how to use all response method.

from api-response.

codivist avatar codivist commented on August 15, 2024

Ok, that fixed it, I took out the use EllipseSynergie\ApiResponse\Laravel\Response; and it works!
Thanks for your quick help.

from api-response.

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.