【发布时间】:2018-08-25 18:54:53
【问题描述】:
我使用 laravel 5.4。
<select name="type" id="type">
<option value="0">title1</option>
<option value="1" selected>title2</option>
<option value="2">title3</option>
</select>
我将数据记录到数据库中。但我无法获得选择框标签的值。我在 Controller 中使用以下代码,结果我得到了文本。
$type = $request->get('type');
or
$type = Input::get('type');
print_r($type) ;
结果:“title2”
我的研究没有发现任何结果。请帮帮我。有推荐的吗?
【问题讨论】: