ManagesComponents
trait ManagesComponents (View source)
Properties
Methods
void
startComponent(View|Htmlable|Closure|string $view, array $data = [])
Start a component rendering process.
void
startComponentFirst(array $names, array $data = [])
Get the first view that actually exists from the given list, and start a component.
string
renderComponent()
Render the current component.
array
componentData()
Get the data for the given component.
mixed|null
getConsumableComponentData(string $key, mixed $default = null)
Get an item from the component data that exists above the current component.
void
slot(string $name, string|null $content = null, array $attributes = [])
Start the slot rendering process.
void
endSlot()
Save the slot content for rendering.
int
currentComponent()
Get the index for the current component.
void
flushComponents()
Flush all of the component state.
Details
void
startComponent(View|Htmlable|Closure|string $view, array $data = [])
Start a component rendering process.
void
startComponentFirst(array $names, array $data = [])
Get the first view that actually exists from the given list, and start a component.
mixed|null
getConsumableComponentData(string $key, mixed $default = null)
Get an item from the component data that exists above the current component.