|
@@ 291-299 (lines=9) @@
|
| 288 |
|
* |
| 289 |
|
* @return \Spatie\Html\Elements\Select |
| 290 |
|
*/ |
| 291 |
|
public function multiselect($name = null, $options = [], $value = null) |
| 292 |
|
{ |
| 293 |
|
return Select::create() |
| 294 |
|
->attributeIf($name, 'name', $this->fieldName($name)) |
| 295 |
|
->attributeIf($name, 'id', $this->fieldName($name)) |
| 296 |
|
->options($options) |
| 297 |
|
->value($name ? $this->old($name, $value) : $value) |
| 298 |
|
->multiple(); |
| 299 |
|
} |
| 300 |
|
|
| 301 |
|
/** |
| 302 |
|
* @param string|null $text |
|
@@ 347-354 (lines=8) @@
|
| 344 |
|
* |
| 345 |
|
* @return \Spatie\Html\Elements\Select |
| 346 |
|
*/ |
| 347 |
|
public function select($name = null, $options = [], $value = null) |
| 348 |
|
{ |
| 349 |
|
return Select::create() |
| 350 |
|
->attributeIf($name, 'name', $this->fieldName($name)) |
| 351 |
|
->attributeIf($name, 'id', $this->fieldName($name)) |
| 352 |
|
->options($options) |
| 353 |
|
->value($name ? $this->old($name, $value) : $value); |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
/** |
| 357 |
|
* @param \Spatie\Html\HtmlElement|string|null $contents |