andersao / andersao/l5-repository
case insensitive queries
- Lingua principale
- PHP
- Stelle
- 4.2k
- Fork
- 880
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.