@@ 324-332 (lines=9) @@ | ||
321 | * |
|
322 | * @return \Spatie\Html\Elements\Select |
|
323 | */ |
|
324 | public function multiselect($name = null, $options = [], $value = null) |
|
325 | { |
|
326 | return Select::create() |
|
327 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
328 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
329 | ->options($options) |
|
330 | ->value($name ? $this->old($name, $value) : $value) |
|
331 | ->multiple(); |
|
332 | } |
|
333 | ||
334 | /** |
|
335 | * @param string|null $text |
|
@@ 381-388 (lines=8) @@ | ||
378 | * |
|
379 | * @return \Spatie\Html\Elements\Select |
|
380 | */ |
|
381 | public function select($name = null, $options = [], $value = null) |
|
382 | { |
|
383 | return Select::create() |
|
384 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
385 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
386 | ->options($options) |
|
387 | ->value($name ? $this->old($name, $value) : $value); |
|
388 | } |
|
389 | ||
390 | /** |
|
391 | * @param \Spatie\Html\HtmlElement|string|null $contents |