You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: collections.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -512,7 +512,7 @@ $combined->all();
512
512
<aname="method-concat"></a>
513
513
#### `concat()` {.collection-method}
514
514
515
-
The `concat` method appends the given `array` or collection's values onto the end of another collection:
515
+
The `concat` method appends the given array or collection's values onto the end of another collection:
516
516
517
517
```php
518
518
$collection = collect(['John Doe']);
@@ -1465,7 +1465,7 @@ $collection->implode(function (array $item, int $key) {
1465
1465
<aname="method-intersect"></a>
1466
1466
#### `intersect()` {.collection-method}
1467
1467
1468
-
The `intersect` method removes any values from the original collection that are not present in the given `array` or collection. The resulting collection will preserve the original collection's keys:
1468
+
The `intersect` method removes any values from the original collection that are not present in the given array or collection. The resulting collection will preserve the original collection's keys:
1469
1469
1470
1470
```php
1471
1471
$collection = collect(['Desk', 'Sofa', 'Chair']);
@@ -1483,7 +1483,7 @@ $intersect->all();
1483
1483
<aname="method-intersectusing"></a>
1484
1484
#### `intersectUsing()` {.collection-method}
1485
1485
1486
-
The `intersectUsing` method removes any values from the original collection that are not present in the given `array` or collection, using a custom callback to compare the values. The resulting collection will preserve the original collection's keys:
1486
+
The `intersectUsing` method removes any values from the original collection that are not present in the given array or collection, using a custom callback to compare the values. The resulting collection will preserve the original collection's keys:
1487
1487
1488
1488
```php
1489
1489
$collection = collect(['Desk', 'Sofa', 'Chair']);
@@ -1500,7 +1500,7 @@ $intersect->all();
1500
1500
<aname="method-intersectAssoc"></a>
1501
1501
#### `intersectAssoc()` {.collection-method}
1502
1502
1503
-
The `intersectAssoc` method compares the original collection against another collection or `array`, returning the key / value pairs that are present in all of the given collections:
1503
+
The `intersectAssoc` method compares the original collection against another collection or array, returning the key / value pairs that are present in all of the given collections:
1504
1504
1505
1505
```php
1506
1506
$collection = collect([
@@ -1523,7 +1523,7 @@ $intersect->all();
1523
1523
<aname="method-intersectassocusing"></a>
1524
1524
#### `intersectAssocUsing()` {.collection-method}
1525
1525
1526
-
The `intersectAssocUsing` method compares the original collection against another collection or `array`, returning the key / value pairs that are present in both, using a custom comparison callback to determine equality for both keys and values:
1526
+
The `intersectAssocUsing` method compares the original collection against another collection or array, returning the key / value pairs that are present in both, using a custom comparison callback to determine equality for both keys and values:
1527
1527
1528
1528
```php
1529
1529
$collection = collect([
@@ -1548,7 +1548,7 @@ $intersect->all();
1548
1548
<aname="method-intersectbykeys"></a>
1549
1549
#### `intersectByKeys()` {.collection-method}
1550
1550
1551
-
The `intersectByKeys` method removes any keys and their corresponding values from the original collection that are not present in the given `array` or collection:
1551
+
The `intersectByKeys` method removes any keys and their corresponding values from the original collection that are not present in the given array or collection:
0 commit comments