Sometimes you want to render HTML inside of a button. Anything passed to the
label()
method is automatically escaped, so you need to use one
of two options.
Button::labelHtml()
For simple HTML, use the labelHtml()
method on the Button element:
{{ Aire::open() }}
{{ Aire::button()->labelHtml('<strong>Important</strong>') }}
{{ Aire::close() }}
Aire::openButton()
and Aire::closeButton()
For more complex HTML, you can use Buttons much like Laravel components:
{{ Aire::open() }}
{{ Aire::openButton() }}
@svg('danger-icon')
This is <strong>dangerous!</strong>
{{ Aire::closeButton() }}
{{ Aire::close() }}