我需要访问eloquent的whereHasNot方法(在此处添加:
https://github.com/laravel/framework/commit/8f0cb08d8ebd157cbfe9fdebb54d2b71b0afaabd)
我通过composer安装了laravel/framework(v5.1.20).但是,该方法不存在于我的/Illuminate/Database/Eloquent/Builder.php文件中.
这是我在composer.json中的内容
"laravel/framework": "5.1.*",
Run Code Online (Sandbox Code Playgroud)
我在这里错过了吗?
如果我无法通过作曲家添加这个,我如何在我的应用程序中扩展Eloquent来添加此方法?
谢谢!
who*_*boy 23
它于whereDoesntHave2014年12月17日更名为.
/**
* Add a relationship count condition to the query with where clauses.
*
* @param string $relation
* @param \Closure|null $callback
* @return \Illuminate\Database\Eloquent\Builder|static
*/
public function whereDoesntHave($relation, Closure $callback = null)
{
return $this->doesntHave($relation, 'and', $callback);
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6259 次 |
| 最近记录: |