@@ 264-272 (lines=9) @@ | ||
261 | * |
|
262 | * @return \Spatie\Html\Elements\Select |
|
263 | */ |
|
264 | public function multiselect($name = null, $options = [], $value = null) |
|
265 | { |
|
266 | return Select::create() |
|
267 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
268 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
269 | ->options($options) |
|
270 | ->value($name ? $this->old($name, $value) : $value) |
|
271 | ->multiple(); |
|
272 | } |
|
273 | ||
274 | /** |
|
275 | * @param string|null $text |
|
@@ 319-326 (lines=8) @@ | ||
316 | * |
|
317 | * @return \Spatie\Html\Elements\Select |
|
318 | */ |
|
319 | public function select($name = null, $options = [], $value = null) |
|
320 | { |
|
321 | return Select::create() |
|
322 | ->attributeIf($name, 'name', $this->fieldName($name)) |
|
323 | ->attributeIf($name, 'id', $this->fieldName($name)) |
|
324 | ->options($options) |
|
325 | ->value($name ? $this->old($name, $value) : $value); |
|
326 | } |
|
327 | ||
328 | /** |
|
329 | * @param \Spatie\Html\HtmlElement|string|null $contents |