Builders are factory-like classes that build components from basic array parameters.
use Steams\Ui\Support\Builder;
$builder = new Builder($parameters = []);
Components are the underlying PHP clases doing the work when leveraging the features of the UI package. Builders build components.
Builders can provide a shortcut to generating built component responses that are contextually accurate.
$builder->response();
// or
$builder->render();
$builder->post();
// etc
Builder parameters can be passed directly to the builder instance.
use Steams\Ui\Support\Builder;
$builder = new Builder($parameters = []);
Stream configuration can be used to define stream-related UI components like tables and forms. These are typically configured by handle.
// streams/example.json
{
...
"ui": {
"forms": {
"default": {
...
}
}
}
}
The above default form can be accessed from the stream object.
use Steams\Core\Support\Facades\Streams;
$form = Streams::make('entries')->form($table = 'default', $extra = []);
By default, no configuration is needed at all for many components, though, as you build specificity into your application you can leverage our vast configuration API to fine-tune multiple complex component behaviors with ease that can be called upon in an instant.
return Streams::make('contacts')->form()->response();
return Streams::make('contacts')->form()->response();
return Streams::make('contacts')->table()->response();