Skip to content

Commit 902fa1b

Browse files
authored
Merge pull request #5477 from kennith/add-requests-hasany
[6.x] Add `hasAny` method
2 parents ac8b01a + 2e2875d commit 902fa1b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

requests.md

+6
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ When given an array, the `has` method will determine if all of the specified val
225225
//
226226
}
227227

228+
The `hasAny` method returns `true` if any of the specified values are present:
229+
230+
if ($request->hasAny(['name', 'email'])) {
231+
//
232+
}
233+
228234
If you would like to determine if a value is present on the request and is not empty, you may use the `filled` method:
229235

230236
if ($request->filled('name')) {

0 commit comments

Comments
 (0)