adonis-support-ticket
adonis-support-ticket copied to clipboard
dropdown
kindly fix the categories in the dropdwon to create tickets.
What exactly is the issue?
you used form builder which is not supported in the latest version. therefore, the dropdown will not reveal items.
Assuming you have gotten categories as:
const categories = await Category.pair('id', 'name')
return view.render('tickets.create', { categories: categories })
Then in the view, you can do something like:
<select>
@each((name, id) in categories)
<option value="{{ id }}">{{ name }}</option>
@endeach
</select>