Giter VIP home page Giter VIP logo

Comments (2)

ronlobo avatar ronlobo commented on September 25, 2024 1

Hi Marcel,

thanks for your reply.

I'm experimenting your api handler package with https://github.com/dingo/api and hope the author of dingo/api will integrate this package into his project.

The possibility of having the query params build in this way for searching and filtering of a query is fantastic!

from laravel-api-handler.

marcelgwerder avatar marcelgwerder commented on September 25, 2024

Hi

Right now, there isn't a convenient method to get the fields from the parser.
I'm of course always looking to improve extensibility and usability so I could imagine to implement something like that in the future. For example:

<?php
$fields = $users->getParser()->getFields();
//Or
$fields = $users->getFields();

However right now this does not exist but nomatter what there are alternatives:

  1. You can get the fields from the GET params and split them up on your own, of course then you won't have the foreign keys that are automatically added according to the _with param.
  2. You should be able to get the columns from the Laravel query builder like:
<?php
//Using this for the unit tests too
$users->getBuilder()->getQuery()->columns;
//Or maybe even that one works but I guess only functions are passed to the query builder by Eloquent
$users->getBuilder()->columns;

from laravel-api-handler.

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.