Skip to main content

Module encode

Module encode 

Source
Expand description

Laravel Blade’s HTML, JSON and JavaScript encoders.

The JavaScript wrapper follows Laravel’s MIT-licensed Illuminate\Support\Js.

Structs§

JsonFlags
Options accepted by PHP’s json_encode.

Enums§

ArrayKey
A key in an insertion-ordered PHP array or JSON object.
EncodeError
An encoding failure reported by PHP’s JSON encoder.
JsonKind
A borrowed view of a value that the encoders can consume.

Traits§

JsonValue
Provide a value to Blade’s encoders without converting ordered PHP keys to JSON strings.

Functions§

e
Escape HTML text with Laravel’s default double encoding.
e_with_double_encode
Escape HTML text as Laravel’s e(), optionally preserving existing HTML 4 entities.
escape_html_bytes
Escape raw UTF-8 bytes, replacing malformed sequences as PHP’s ENT_SUBSTITUTE does.
js
Encode a value as Laravel’s Js::from (Blade’s @js).
json
Encode a value as Blade’s @json. Omit flags and depth for the Blade defaults.

Type Aliases§

Entries
An iterator in the order keys were inserted.