andersao / andersao/l5-repository

whereHas() breaks abstraction

Aberta
#689 0 comentários 0 reações 0 responsáveis Ver no GitHub
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

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.