trait HasBlocks (View source)

Methods

MorphMany
blocks()

Defines the one-to-many relationship for block objects.

renderNamedBlocks($name = 'default', $renderChilds = true, $blockViewMappings = [], $data = [])

No description

string
renderBlocks(bool $renderChilds = true, array $blockViewMappings = [], array $data = [])

Returns the rendered Blade views for all attached blocks in their proper order.

Details

MorphMany blocks()

Defines the one-to-many relationship for block objects.

Return Value

MorphMany

renderNamedBlocks($name = 'default', $renderChilds = true, $blockViewMappings = [], $data = [])

No description

Parameters

$name
$renderChilds
$blockViewMappings
$data

string renderBlocks(bool $renderChilds = true, array $blockViewMappings = [], array $data = [])

Returns the rendered Blade views for all attached blocks in their proper order.

Parameters

bool $renderChilds

Include all child blocks in the rendered output.

array $blockViewMappings

Provide alternate Blade views for blocks. Format: ['block-type' => 'view.path'].

array $data

Provide extra data to Blade views.

Return Value

string