mirror of
https://github.com/flarum/framework.git
synced 2025-03-11 12:51:26 +08:00
resume chain in query builder
This commit is contained in:
parent
b35afc2be7
commit
6fcc720f6c
@ -99,8 +99,9 @@ class PostPolicy extends AbstractPolicy
|
||||
->from('discussions')
|
||||
->whereColumn('discussions.id', 'posts.discussion_id')
|
||||
->where(function ($query) use ($actor) {
|
||||
$query->whereRaw('1=0');
|
||||
$query->orWhere(function ($query) use ($actor) {
|
||||
$query
|
||||
->whereRaw('1=0')
|
||||
->orWhere(function ($query) use ($actor) {
|
||||
$this->events->dispatch(
|
||||
new ScopeModelVisibility(Discussion::query()->setQuery($query), $actor, 'hidePosts')
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user