['text' => 'Display Text', 'link' => 'https://...'], * ] * * @var array */ public $options; /** * Selected option * * @var mixed */ public $selected; /** * Create a new component instance. * * @param string $name * @param array $options * @param mixed $selected */ public function __construct(string $name = '', array $options = [], $selected = null) { $this->name = $name; $this->options = $options; $this->selected = $selected; } /** * Get the view / contents that represent the component. * * @return \Illuminate\Contracts\View\View|\Closure|string */ public function render() { return view('components.option-bar'); } }