andersao / andersao/l5-repository

Why my Criteria not apply?

未关闭
#267 9 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug
主要语言
PHP
星标
4.2k
派生
880
PR 合并指标
30 天内没有已合并 PR

描述

Hello guys,
Can anyone inspect this code and help me to understand why my criteria not apply?
My Criteria:

```
where('show_admin', '=', false);
return $model;
}
}
```

My Repository:

```
pushCriteria(new UserCriteria());
}
}

/**
* Specify Model class name
*
* @return string
*/
public function model()
{
return User::class;
}
```

But when I login with user with role !== 'owner' the criteria not apply
Help me please!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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