andersao / andersao/l5-repository
whereHas() breaks abstraction
未关闭
- 主要语言
- PHP
- 星标
- 4.2k
- 派生
- 880
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
评估
这个 Issue 还没有评估数据。