Skip to content
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

[5.5] Allow to automatically use where/whereIn or whereNot/whereNotIn methods in DatabaseRule #20739

Merged

Conversation

mnabialek
Copy link
Contributor

This adds additional improvement to where/whereIn and whereNot/whereNotIn methods in DatabaseRule trait. If you don't know what exactly is value (array or string) probably we don't want to force user to write code like this:

if (is_array($value)) {
   $rule->whereIn('column', $value);
}
else {
   $rule->where('column', $value);
}

If merged, in such case either where or whereIn can be used with exact same result. It will be especially useful if request data is used as value.

@taylorotwell taylorotwell merged commit 4df8f8d into laravel:master Aug 25, 2017
@mnabialek mnabialek deleted the add-databaserule-improvements branch November 5, 2017 17:01
@mnabialek mnabialek restored the add-databaserule-improvements branch November 5, 2017 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants