我可以知道我的代码有什么问题吗?我在数据库中注册了三个用户类型名称,但是我的代码将导致三个下拉菜单,每个菜单上都有单独的用户类型名称。
@foreach($user_types as $usertype)
<div class="form-group">
{!! Form::select('chap_user_type_name', array('chap_user_name' => $usertype), null, ['class' => 'form-control']) !!}
</div>
@endforeach
删除 foreach 并将数组传递给 select 像这样
{!! Form::select('chap_user_type_name', $user_types, null, ['class' => 'form-control']) !!}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)