Git Product home page Git Product logo

eloquent-repository's Issues

Filters where equal

Buenas, he visto el repositorio y estoy haciendo unas pruebas, la duda que tengo es para hacer la siguiente consulta:
select count(id) from table where id = value and other_field = 'value2';

He seguido la estructura del filter, que sería así:
$filters = new Filter();
$filters->must()->equal('id', value);
$filters->must()->equal('other_field', 'value2');

total = parent::count($filters);

mi duda está en que el processCondition peta en querer comprobar el valor si es array
if (count($value[0]) > 1) { $where = static::filterRanges.......... } else { $where = static::filterGroup.......... }
Cuando realmente no quiero que entre en rango, ni en grupo, pero los filtros, siempre los trata como array.

Cual puede ser la solución.

Gracias

Questions

Hi, this package looks great, well done (y).

Nested Queries

How would you approach a nested query? say we have a user with posts and I'd like to get the user with the latest 3 posts titles.

Validation

Do you just use laravel's validation? the problem is you'll be using the query builder when you do this and this kind of kills the abstraction layer a repository is supposed to provide.

Sorry if these questions are kind of off topic, they're just one of the reasons the repository pattern never seemed to work for me with eloquent, you always find yourself rewriting every cool feature of Laravel!

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.