/**
 * Encodes data with MIME base64.
 *
 * @return self Returns instance of The Strings class.
 */
public function base64Encode(): self

Examples

$result = Strings::create('test')->base64Encode();

echo $result;

The above example will output:

dGVzdA==

Getting Started

Methods