class ComponentSlot implements Htmlable, Stringable

Properties

ComponentAttributeBag $attributes

The slot attribute bag.

Methods

__construct(string $contents = '', array $attributes = [])

Create a new slot instance.

withAttributes(array $attributes)

Set the extra attributes that the slot should make available.

string
toHtml()

Get the slot's HTML string.

bool
isEmpty()

Determine if the slot is empty.

bool
isNotEmpty()

Determine if the slot is not empty.

bool
hasActualContent(callable|string|null $callable = null)

Determine if the slot has non-comment content.

string
__toString()

Get the slot's HTML string.

Details

at line 21
__construct(string $contents = '', array $attributes = [])

Create a new slot instance.

Parameters

string $contents
array $attributes

at line 31
ComponentSlot withAttributes(array $attributes)

Set the extra attributes that the slot should make available.

Parameters

array $attributes

Return Value

ComponentSlot

at line 41
string toHtml()

Get the slot's HTML string.

Return Value

string

at line 49
bool isEmpty()

Determine if the slot is empty.

Return Value

bool

at line 57
bool isNotEmpty()

Determine if the slot is not empty.

Return Value

bool

at line 65
bool hasActualContent(callable|string|null $callable = null)

Determine if the slot has non-comment content.

Parameters

callable|string|null $callable

Return Value

bool

at line 81
string __toString()

Get the slot's HTML string.

Return Value

string