Return an HtmlString object in order to add HTML to a field label.
Example:
use Illuminate\Support\HtmlString; Checkbox::make('accept') ->label(fn () => new HtmlString('I accept the <a href="" target="_blank">terms and conditions</a>')) ->required(),
Nice!
If your server-side validation fails for some reason, you may see HTML in the validation error message:
Use
validationAttribute()
to set the label of the field for validation purposes: