public function render(array $attributes = [], array $viewData = []) { $this->options = array_merge($this->options, $attributes); $this->options['value'] = $this->getName(); $this->value = $this->getName(); return parent::render($attributes, $viewData); }
public function render(array $attributes = [], array $viewData = []) { $this->options = array_merge($this->options, $attributes); $value = old(str_replace('[]', '', $this->name), $this->getOption('value')); unset($this->options['value']); $this->setSelectOptions($value); return parent::render($attributes, $viewData); }