Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update README.md
  • Loading branch information
pascalbaljet committed Nov 1, 2021
commit b157e823b0dcf875f0846b1bf5469eed1d86e3dc
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,21 @@ If you want a select element where multiple options can be selected, add the `mu
<x-form-select name="country_code[]" :options="$countries" multiple :default="['be', 'nl']" />
```

You may add a `placeholder` attribute to the select element. This will prepend a disabled option. This feature was added in v3.2.0. If you're upgrading from a previous version *and* you published the Blade views, you should republish them *or* update them manually.

```blade
<x-form-select name="country_code" placeholder="Choose..." />
```

Rendered HTML:

```html
<select>
<option value="" disabled>Choose...</option>
<!-- other options... -->
</select>
```

#### Using Eloquent relationships

This package has built-in support for `BelongsToMany`, `MorphMany`, and `MorphToMany` relationships. To utilize this feature, you must add both the `multiple` and `many-relation` attribute to the select element.
Expand Down