The object
field type is used for storing objects. Objects can be simple or complex types. By default, any type is valid.
// streams/example.json
"fields": {
"address": {
"type": "object"
}
}
{
"address": {
"street": "3159 W 11th St",
"city": "Cleveland",
"state": "OH"
}
}
Basic object access:
@verbatim// Array access
{{ $entry->address->street }}
@endverbatim
The decorated value provides an object as well.
@verbatim// Decorated value
{{ $entry->address->street }}
@endverbatim
@todo Generate methods from @docs
@todo Generate config options from class::configuration
Use the sdchemas
configuration to specify the allowed types. If specified, each item must be valid against one of the provided types.
// streams/example.json
"fields": {
"items": {
"type": "object",
"config": {
"schemas": [
{ "stream": "addresses" },
{ "abstract": "App\\Support\\Address" }
]
}
}
}
A blank TALL-stack Laravel project with Streams.
The fundamental features and utilities offered by the Streams platform.
A universal and extensible RESTful API for Streams.
Extensible, user-friendly, and performant control panel, components, and services.
Dev tooling for Laravel Streams.