To::base64()

Encodes to Base64 string.

Table of Contents
  1. Description
  2. Example

Description

To::base64(?string $value): ?string;

This method encodes string to Base64 string.

Example

$value = To::base64('i love you'); // Returns `'aSBsb3ZlIHlvdQ=='`

To::URL()

Converts private file path to public URL, or decodes URL special characters.

To::base64()

Encodes to Base64 string.

To::entity()

Converts characters to their corresponding HTML entities.

To::file()

Converts current value to a safe file name.

To::path()

Converts public URL to private file path.