File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
55
55
[ Arr::from] ( #method-array-from )
56
56
[ Arr::get] ( #method-array-get )
57
57
[ Arr::has] ( #method-array-has )
58
+ [ Arr::hasAll] ( #method-array-hasall )
58
59
[ Arr::hasAny] ( #method-array-hasany )
59
60
[ Arr::integer] ( #method-array-integer )
60
61
[ Arr::isAssoc] ( #method-array-isassoc )
@@ -557,6 +558,21 @@ $contains = Arr::has($array, ['product.price', 'product.discount']);
557
558
// false
558
559
```
559
560
561
+ <a name =" method-array-hasall " ></a >
562
+ #### ` Arr::hasAll() ` {.collection-method}
563
+
564
+ The ` Arr::hasAll ` method determines if all of the specified keys exist in the given array using "dot" notation:
565
+
566
+ ``` php
567
+ use Illuminate\Support\Arr;
568
+
569
+ $array = ['name' => 'Taylor', 'language' => 'php'];
570
+
571
+ Arr::hasAll($array, ['name']); // true
572
+ Arr::hasAll($array, ['name', 'language']); // true
573
+ Arr::hasAll($array, ['name', 'ide']); // false
574
+ ```
575
+
560
576
<a name =" method-array-hasany " ></a >
561
577
#### ` Arr::hasAny() ` {.collection-method}
562
578
You can’t perform that action at this time.
0 commit comments