andersao / andersao/l5-repository

whereHas() breaks abstraction

未关闭
#689 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
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 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。