Skip to content

Commit

Permalink
Merge pull request #4894 from rbarden/5.7
Browse files Browse the repository at this point in the history
[5.7] Update collection every() method documentation
  • Loading branch information
taylorotwell committed Jan 9, 2019
2 parents a8335a8 + 8b51827 commit a41d796
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions collections.md
Expand Up @@ -517,6 +517,16 @@ The `every` method may be used to verify that all elements of a collection pass

// false

If the collection is empty, `every` will return true:

$collection = collect([]);

$collection->every(function($value, $key) {
return $value > 2;
});

// true

<a name="method-except"></a>
#### `except()` {#collection-method}

Expand Down

0 comments on commit a41d796

Please sign in to comment.