-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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.6] Allow array/collections in Auth::attempt method #24620
Conversation
@lucasmichot @dwightwatson Thank You for the input. It seems that Collection does implement Arrayable however the following code does not seem to work as it should.
in the code above if i do
Any idea why? |
See #24620 (comment) 😄 |
@lucasmichot @dwightwatson Thanks, That did it. I've updated the PR. |
So I believe this should work now |
Currently Auth::attempt allows to pass in additional conditions, however, it won't allow passing in arrays as conditions.
Current behavior
Results in the following query:
With this PR the above code will generate the following query instead:
This supports both arrays and collections so the following is exactly the same as the example above
I hope i added the test correctly. All tests seem to pass with this change.
Based on the Contributing guide i added this to the current release since it's a minor change and has no backwards compatibility breaks.
Thank You.