Parser

Introduction

The Parser class is a simple service that parses data into a string. The parser leverages the (https://packagist.org/packages/nicmart/string-template) package.

Basic Usage

Include the Anomaly\Streams\Platform\Support\Parser class in your code to get started.

parse

The parse method recursively parses the target value with given data.

$parser = app(Anomaly\Streams\Platform\Support\Parser::class);

$parser->parse('Hello {user.first_name} {user.last_name}!', ['user' => Auth::user()]);

Parsing is used heavily in the build process for UI builders.{.tip}