src/Html/FormBuilder.php
protected function optionGroup($list, $label, $selected, array $attributes = [])
    {
        $html = [];

        foreach ($list as $value => $display) {
            $html[] = $this->option($display, $value, $selected, $attributes);
        }

        return $this->toHtmlString('<optgroup label="'.e($label).'">'.implode('', $html).'</optgroup>');
    }
protected function optionGroup($list, $label, $selected, array $attributes = [])
    {
        $html = [];

        foreach ($list as $value => $display) {
            $html[] = $this->option($display, $value, $selected, $attributes);
        }

        return $this->toHtmlString('<optgroup label="'.e($label).'">'.implode('', $html).'</optgroup>');
    }
Create an option group form element.

@param  array $list
@param  string $label
@param  string $selected
@param  array $attributes

@return \Illuminate\Support\HtmlString