andersao / andersao/l5-repository
whereHas() breaks abstraction
- Linguagem predominante
- PHP
- Estrelas
- 4.2k
- Forks
- 880
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
I thought this package is meant to 'abstract the database layer' as stated in the repository description.
The repository interface requires me to implement the method whereHas()
```
/**
* Load relation with closure
*
* @param string $relation
* @param closure $closure
*
* @return $this
*/
public function whereHas($relation, $closure);
```
The closure implementation makes no sense outside of Eloquent.
You must revert https://github.com/andersao/l5-repository/pull/208 and https://github.com/andersao/l5-repository/pull/308.
I someone needs a whereHas(), they should implement a criteria instead.
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.