andersao / andersao/l5-repository
case insensitive queries
- Lenguaje dominante
- PHP
- Estrellas
- 4.2k
- Forks
- 880
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi,
Is it possible to perform case-insensitive queries with this package?
This works but i want to apply this on a repository level so it will always be insensitive.
`$this->testRepository
->findWhere([
'email' => ['email', 'ilike', strtolower($userEmail)],
]);`
It looks like creating a Criteria is the closest to what i need however i cannot see how to make the criteria input dynamic.
for example: creating criteria as mentioned in the documentation
```php
public function apply($model, RepositoryInterface $repository)
{
$model = $model->where('user_id','=', Auth::user()->id );
return $model;
}
```
does not give me the ability to specify a dynamic input.
I need something like:
```php
public function apply($model, RepositoryInterface $repository)
{
$model = $model->where('email','ilike');
return $model;
}
```
Any suggestions?
thanks
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.