|
@@ 236-244 (lines=9) @@
|
| 233 |
|
* |
| 234 |
|
* @return \Spatie\Html\Elements\Select |
| 235 |
|
*/ |
| 236 |
|
public function multiselect($name = null, $options = [], $value = null) |
| 237 |
|
{ |
| 238 |
|
return Select::create() |
| 239 |
|
->attributeIf($name, 'name', $this->fieldName($name)) |
| 240 |
|
->attributeIf($name, 'id', $this->fieldName($name)) |
| 241 |
|
->options($options) |
| 242 |
|
->value($name ? $this->old($name, $value) : $value) |
| 243 |
|
->multiple(); |
| 244 |
|
} |
| 245 |
|
|
| 246 |
|
/** |
| 247 |
|
* @param string|null $text |
|
@@ 291-298 (lines=8) @@
|
| 288 |
|
* |
| 289 |
|
* @return \Spatie\Html\Elements\Select |
| 290 |
|
*/ |
| 291 |
|
public function select($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 |
|
} |
| 299 |
|
|
| 300 |
|
/** |
| 301 |
|
* @param \Spatie\Html\HtmlElement|string|null $contents |