diff --git a/helpers.md b/helpers.md index d1c89d01408..bfa84e7e197 100644 --- a/helpers.md +++ b/helpers.md @@ -187,6 +187,7 @@ Laravel includes a variety of global "helper" PHP functions. Many of these funct [studly](#method-fluent-str-studly) [substr](#method-fluent-str-substr) [tap](#method-fluent-str-tap) +[test](#method-fluent-str-test) [title](#method-fluent-str-title) [trim](#method-fluent-str-trim) [ucfirst](#method-fluent-str-ucfirst) @@ -2312,6 +2313,17 @@ The `tap` method passes the string to the given closure, allowing you to examine // LARAVEL FRAMEWORK + +#### `test` {#collection-method} + +The `test` method determines if a string matches the given regular expression pattern: + + use Illuminate\Support\Str; + + $result = Str::of('Laravel Framework')->test('/Laravel/'); + + // true + #### `title` {#collection-method}