Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[Str::endsWith](#method-ends-with)
[Str::excerpt](#method-excerpt)
[Str::finish](#method-str-finish)
[Str::fromBase64](#method-str-from-base64)
[Str::headline](#method-str-headline)
[Str::inlineMarkdown](#method-str-inline-markdown)
[Str::is](#method-str-is)
Expand Down Expand Up @@ -154,6 +155,7 @@ Laravel includes a variety of functions for manipulating string values. Many of
[excerpt](#method-fluent-str-excerpt)
[explode](#method-fluent-str-explode)
[finish](#method-fluent-str-finish)
[fromBase64](#method-fluent-str-from-base64)
[hash](#method-fluent-str-hash)
[headline](#method-fluent-str-headline)
[inlineMarkdown](#method-fluent-str-inline-markdown)
Expand Down Expand Up @@ -1552,6 +1554,19 @@ $converted = Str::title('a nice title uses the correct case');
// A Nice Title Uses The Correct Case
```

<a name="method-str-from-base64"></a>
#### `Str::fromBase64()` {.collection-method}

The `Str::fromBase64` method converts the given Base64 string back to its original string:

```php
use Illuminate\Support\Str;

$base64 = Str::fromBase64('TGFyYXZlbA==');

// Laravel
```

<a name="method-str-to-base64"></a>
#### `Str::toBase64()` {.collection-method}

Expand Down Expand Up @@ -3265,6 +3280,19 @@ $converted = Str::of('a nice title uses the correct case')->title();
// A Nice Title Uses The Correct Case
```

<a name="method-fluent-str-from-base64"></a>
#### `fromBase64` {.collection-method}

The `fromBase64` method converts the given Base64 string back to its original string:

```php
use Illuminate\Support\Str;

$base64 = Str::of('TGFyYXZlbA==')->fromBase64();

// Laravel
```

<a name="method-fluent-str-to-base64"></a>
#### `toBase64` {.collection-method}

Expand Down