|
@@ 298-306 (lines=9) @@
|
| 295 |
|
* |
| 296 |
|
* @return \Spatie\Html\Elements\Select |
| 297 |
|
*/ |
| 298 |
|
public function multiselect($name = null, $options = [], $value = null) |
| 299 |
|
{ |
| 300 |
|
return Select::create() |
| 301 |
|
->attributeIf($name, 'name', $this->fieldName($name)) |
| 302 |
|
->attributeIf($name, 'id', $this->fieldName($name)) |
| 303 |
|
->options($options) |
| 304 |
|
->value($name ? $this->old($name, $value) : $value) |
| 305 |
|
->multiple(); |
| 306 |
|
} |
| 307 |
|
|
| 308 |
|
/** |
| 309 |
|
* @param string|null $text |
|
@@ 355-362 (lines=8) @@
|
| 352 |
|
* |
| 353 |
|
* @return \Spatie\Html\Elements\Select |
| 354 |
|
*/ |
| 355 |
|
public function select($name = null, $options = [], $value = null, $strict = false) |
| 356 |
|
{ |
| 357 |
|
return Select::create() |
| 358 |
|
->attributeIf($name, 'name', $this->fieldName($name)) |
| 359 |
|
->attributeIf($name, 'id', $this->fieldName($name)) |
| 360 |
|
->options($options) |
| 361 |
|
->value($name ? $this->old($name, $value) : $value, $strict); |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
/** |
| 365 |
|
* @param \Spatie\Html\HtmlElement|string|null $contents |