@@ -145,8 +145,10 @@ Laravel includes a variety of functions for manipulating string values. Many of
145
145
[ chopEnd] ( #method-fluent-str-chop-end )
146
146
[ contains] ( #method-fluent-str-contains )
147
147
[ containsAll] ( #method-fluent-str-contains-all )
148
+ [ decrypt] ( #method-fluent-str-decrypt )
148
149
[ deduplicate] ( #method-fluent-str-deduplicate )
149
150
[ dirname] ( #method-fluent-str-dirname )
151
+ [ encrypt] ( #method-fluent-str-encrypt )
150
152
[ endsWith] ( #method-fluent-str-ends-with )
151
153
[ exactly] ( #method-fluent-str-exactly )
152
154
[ excerpt] ( #method-fluent-str-excerpt )
@@ -2140,6 +2142,21 @@ $containsAll = Str::of('This is my name')->containsAll(['MY', 'NAME'], ignoreCas
2140
2142
// true
2141
2143
```
2142
2144
2145
+ <a name =" method-fluent-str-decrypt " ></a >
2146
+ #### ` decrypt ` {.collection-method}
2147
+
2148
+ The ` decrypt ` method [ decrypts] ( /docs/{{version}}/encryption ) the encrypted string:
2149
+
2150
+ ``` php
2151
+ use Illuminate\Support\Str;
2152
+
2153
+ $decrypted = $encrypted->decrypt();
2154
+
2155
+ // 'secret'
2156
+ ```
2157
+
2158
+ For the inverse of ` decrypt ` , see the [ encrypt] ( #method-fluent-str-encrypt ) method.
2159
+
2143
2160
<a name =" method-fluent-str-deduplicate " ></a >
2144
2161
#### ` deduplicate ` {.collection-method}
2145
2162
@@ -2186,6 +2203,19 @@ $string = Str::of('/foo/bar/baz')->dirname(2);
2186
2203
// '/foo'
2187
2204
```
2188
2205
2206
+ <a name =" method-fluent-str-encrypt " ></a >
2207
+ #### ` encrypt ` {.collection-method}
2208
+
2209
+ The ` encrypt ` method [ encrypts] ( /docs/{{version}}/encryption ) the string:
2210
+
2211
+ ``` php
2212
+ use Illuminate\Support\Str;
2213
+
2214
+ $encrypted = Str::of('secret')->encrypt();
2215
+ ```
2216
+
2217
+ For the inverse of ` encrypt ` , see the [ decrypt] ( #method-fluent-str-decrypt ) method.
2218
+
2189
2219
<a name =" method-fluent-str-ends-with " ></a >
2190
2220
#### ` endsWith ` {.collection-method}
2191
2221
0 commit comments