trait HasBlocks (View source)

Methods

MorphMany
blocks()

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

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

No description

string
renderBlocks(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', $blockViewMappings = [], $data = [])

No description

Parameters

$name
$blockViewMappings
$data

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

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

Parameters

array $blockViewMappings

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

array $data

Provide extra data to Blade views.

Return Value

string