ComponentSlot
class ComponentSlot implements Htmlable (View source)
Properties
| ComponentAttributeBag | $attributes | The slot attribute bag. | |
| protected string | $contents | The slot contents. |
Methods
| 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. |
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/View/ComponentSlot.html