We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using hasAny() on the request helper, it returns false when using an array but true when using multiple params.
hasAny()
laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php hasAny() function receives the keys like this;
// via array
array:1 [▼ 0 => array:3 [▼ 0 => "from" 1 => "to" 2 => "manager" ] ]
// via params
array:3 [▼ 0 => "from" 1 => "to" 2 => "manager" ]
URL: http://domain.ext?from=17-01-2018
http://domain.ext?from=17-01-2018
hasAny
dd( request()->all(), request()->hasAny('from', 'to', 'manager'), request()->hasAny(['from', 'to', 'manager']) );
The text was updated successfully, but these errors were encountered:
See the code. The method expects individual parameters. So the array is recognized as a single param. Maybe a PR?
Sorry, something went wrong.
PR submitted to 5.6 branch #22952
No branches or pull requests
Description:
When using
hasAny()
on the request helper, it returns false when using an array but true when using multiple params.laravel/framework/src/Illuminate/Http/Concerns/InteractsWithInput.php
hasAny()
function receives the keys like this;// via array
// via params
Steps To Reproduce:
URL:
http://domain.ext?from=17-01-2018
hasAny
with array, this will return false.hasAny
with multiple params, this will return true.The text was updated successfully, but these errors were encountered: