@@ 306-314 (lines=9) @@ | ||
303 | * |
|
304 | * @return \Spatie\Html\Elements\Select |
|
305 | */ |
|
306 | public function multiselect($name = null, $options = [], $value = null) |
|
307 | { |
|
308 | return Select::create() |
|
309 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
310 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
311 | ->options($options) |
|
312 | ->value($name ? $this->old($name, $value) : $value) |
|
313 | ->multiple(); |
|
314 | } |
|
315 | ||
316 | /** |
|
317 | * @param string|null $text |
|
@@ 363-370 (lines=8) @@ | ||
360 | * |
|
361 | * @return \Spatie\Html\Elements\Select |
|
362 | */ |
|
363 | public function select($name = null, $options = [], $value = null) |
|
364 | { |
|
365 | return Select::create() |
|
366 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
367 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
368 | ->options($options) |
|
369 | ->value($name ? $this->old($name, $value) : $value); |
|
370 | } |
|
371 | ||
372 | /** |
|
373 | * @param \Spatie\Html\HtmlElement|string|null $contents |