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