-
-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally include unpublished entries #7334
Optionally include unpublished entries #7334
Conversation
It all seems to work well now. In It would be nice to access the |
I decided to add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good but I don't think it will work when using the eloquent driver, or any other entry driver.
They won't have a wheres
method in it.
It might be tedious but I think we need to override all the where
methods.
public function where($column, $operator = null, $value = null, $boolean = 'and')
{
if ($column === 'status') {
$this->hasQueriedStatus = true;
}
$this->builder->where($column, $operator, $value, $boolean);
return $this;
}
public function whereIn($column, $values, $boolean = 'and') { ... }
public function orWhereIn($column, $values) { ... }
// etc
|
Thank you for that feedback. The |
Nice solution. |
Thank you. I see now that I actually forgot the basic |
Any chance this will find its way into core with 4.0? |
Made some small tweaks and adjusted tests. Also, I added the ability to pass in the |
😀 very nice! I am glad that this is integrated. |
This PR applies the policy to exclude unpublished entries by default, and leave the option to include them by using a filter explicitly.