ComponentSlot
class ComponentSlot implements Htmlable, Stringable (View source)
Properties
| ComponentAttributeBag | $attributes | The slot attribute bag. |
|
| protected string | $contents | The slot contents. |
Methods
Create a new slot instance.
Set the extra attributes that the slot should make available.
Get the slot's HTML string.
Determine if the slot is empty.
Determine if the slot is not empty.
Determine if the slot has non-comment content.
Get the slot's HTML string.
Details
void
__construct(string $contents = '', array $attributes = [])
Create a new slot instance.
$this
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.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.