andersao / andersao/l5-repository
Check if int is > 0
- Lenguaje dominante
- PHP
- Estrellas
- 4.2k
- Forks
- 880
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi, I have found a very strange case.
I have a table with an integer field called quantity and I would like to search with $fieldSearchable only if is > 0.
This is my code for $fieldSearchable inside my model
```
protected $fieldSearchable = [
'quantity'=>'>'
];
```
Into my database I have two records: one with quantity 2 and another with quantity 0
If I try to make this request:
`?search=1&searchFields=quantity
`
returns me the first array correctly
If I make this request:
`?search=0&searchFields=quantity`
returns me the first and the second record! But I'm expected to return only the first with quantity 2 not the second with quantity 0
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.