I have model with attributes category i want pass 1 data to select tag
Category option
Category
1. Fruit
2. Vegetables
3. Meat
example data
name | category |
---|---|
Apple | 1 |
how i can pass apple category to select tag
<select class="form-control form-select" name="category" aria-label="Default select example">
<option value=""></option>
<option value="1">fruit</option>
<option value="2">vegetables</option>
<option value="3">meat</option>
</select>
source https://stackoverflow.com/questions/69749269/how-to-pass-value-from-model-to-select-input-use-laravel-eloquent
Comments
Post a Comment