Skip to content

Commit

Permalink
New Str helper: containsAll() (#5231)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahinkle authored and taylorotwell committed Jun 13, 2019
1 parent 36ac25d commit 41b257b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct
[Str::before](#method-str-before)
[Str::camel](#method-camel-case)
[Str::contains](#method-str-contains)
[Str::containsAll](#method-str-contains-all)
[Str::endsWith](#method-ends-with)
[Str::finish](#method-str-finish)
[Str::is](#method-str-is)
Expand Down Expand Up @@ -867,6 +868,17 @@ You may also pass an array of values to determine if the given string contains a

// true

<a name="method-str-contains-all"></a>
#### `Str::containsAll()` {#collection-method}

The `Str::containsAll` method determines if the given string contains all array values:

use Illuminate\Support\Str;

$containsAll = Str::containsAll('This is my name', ['my', 'name']);

// true

<a name="method-ends-with"></a>
#### `Str::endsWith()` {#collection-method}

Expand Down

0 comments on commit 41b257b

Please sign in to comment.