How to customize the label for options in CheckboxList?

Right now I am getting the options for ChecboxList like:
CheckboxList::make('cars')
  ->options(
      Car::where('is_red', true)
          ->orderBy('year', 'desc')
          ->pluck('name', 'id')
    )


and it works.

But I need to do custom made each option that can use HTML code, for example:

<span style="font-weight: bold;">name<span> - with ID: <span>id</span>


How to do that?
Solution
Use new HtmlString(). And probably also ->allowHtml() on the select
Was this page helpful?