Skip to content

Commit 8b0fa5b

Browse files
authored
Document Collection::isNotEmpty() method
Documents the feature added by laravel/framework#16797
1 parent 6cf0ac5 commit 8b0fa5b

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
@@ -72,6 +72,7 @@ For the remainder of this documentation, we'll discuss each method available on
7272
[implode](#method-implode)
7373
[intersect](#method-intersect)
7474
[isEmpty](#method-isempty)
75+
[isNotEmpty](#method-isnotempty)
7576
[keyBy](#method-keyby)
7677
[keys](#method-keys)
7778
[last](#method-last)
@@ -606,6 +607,15 @@ The `isEmpty` method returns `true` if the collection is empty; otherwise, `fals
606607

607608
// true
608609

610+
<a name="method-isnotempty"></a>
611+
#### `isNotEmpty()` {#collection-method}
612+
613+
The `isNotEmpty` method returns `true` if the collection is not empty; otherwise, `false` is returned:
614+
615+
collect([])->isNotEmpty();
616+
617+
// false
618+
609619
<a name="method-keyby"></a>
610620
#### `keyBy()` {#collection-method}
611621

0 commit comments

Comments
 (0)