如何在拉拉维尔中获取选择选项值


How to get the select option value in Laravel

>我有一个选择选项,如下所示。

<select name = "type">
 <option value="">Select one</option>
 <option value="1">Abc</option>
 <option value="2">Xyz</option>
</select>

我试图使用 Input::get('type') 但是获取标签Abc.我需要将值获取为123,具体取决于我选择的值。我什至试过这个

<select name = "type" onchange="document.getElementById('typeId').value=this.options[this.selectedIndex].value;">

但同样的事情发生了。我该怎么做?

只是

document.getElementById('typeId').value=this.value;