Skip to content

Commit e793353

Browse files
authored
Merge pull request #3221 from paulofreitas/collection-isnotempty
[5.4] Document Collection::isNotEmpty() method
2 parents b7c11ba + 8b0fa5b commit e793353

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

collections.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ For the remainder of this documentation, we'll discuss each method available on
7373
[implode](#method-implode)
7474
[intersect](#method-intersect)
7575
[isEmpty](#method-isempty)
76+
[isNotEmpty](#method-isnotempty)
7677
[keyBy](#method-keyby)
7778
[keys](#method-keys)
7879
[last](#method-last)
@@ -610,6 +611,15 @@ The `isEmpty` method returns `true` if the collection is empty; otherwise, `fals
610611

611612
// true
612613

614+
<a name="method-isnotempty"></a>
615+
#### `isNotEmpty()` {#collection-method}
616+
617+
The `isNotEmpty` method returns `true` if the collection is not empty; otherwise, `false` is returned:
618+
619+
collect([])->isNotEmpty();
620+
621+
// false
622+
613623
<a name="method-keyby"></a>
614624
#### `keyBy()` {#collection-method}
615625

0 commit comments

Comments
 (0)