0
我在这个表单中有2个选择框,第一个选择框完成并工作。从Laravel的数据库创建一个选择框表单
...但是当我添加第二个选择框,看起来像图片中的错误..
这里的代码
这是第一个选择框 - 它的工作原理:
{{ Form::open(array('url' =>route('units.store'), 'method' => 'post'))}}
<div class="form-group @if ($errors->has('brand_id')) has-error @endif">
<label>Brand Manufacture</label>
{{Form::select('brand_id', $brand, null, ['class' => 'form-control w450']) }}
@if ($errors->has('brand_id')) <p class="help-block">{{ $errors->first('brand_id') }}</p> @endif
</div>
这是选择这是不对的:
<div class="form-group @if ($errors->has('model_id')) has-error @endif">
<label>Model Type</label>
{{Form::select('model_id',$model, null, ['class' => 'form-control w450']) }}
@if ($errors->has('model_id')) <p class="help-block">{{ $errors->first('model_id') }}</p> @endif
</div>
这是整个合作德。
{{ Form::open(array('url' =>route('units.store'), 'method' => 'post'))}}
<div class="form-group @if ($errors->has('brand_id')) has-error @endif">
<label>Brand Manufacture</label>
{{Form::select('brand_id', $brand, null, ['class' => 'form-control w450']) }}
@if ($errors->has('brand_id')) <p class="help-block">{{ $errors->first('brand_id') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('model_id')) has-error @endif">
<label>Model Type</label>
{{Form::select('model_id',$model, null, ['class' => 'form-control w450']) }}
@if ($errors->has('model_id')) <p class="help-block">{{ $errors->first('model_id') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('kva')) has-error @endif">
<label>kva</label>
<input name="kva" type="text" class="form-control w450" value="{{ Input::old('kva') }}">
@if ($errors->has('kva')) <p class="help-block">{{ $errors->first('kva') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('type')) has-error @endif">
<label>Type</label>
<select name="type" id="" class="form-control w450">
<option value="OPEN">OPEN</option>
<option value="CLOSE">CLOSE</option>
</select>
@if ($errors->has('type')) <p class="help-block">{{ $errors->first('type') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('sn')) has-error @endif">
<label>Serial Number</label>
<input name="sn" type="text" class="form-control w450" value="{{ Input::old('sn') }}">
@if ($errors->has('sn')) <p class="help-block">{{ $errors->first('sn') }}</p> @endif
</div>
<div class="form-group @if ($errors->has('wbs_unit')) has-error @endif">
<label>WBS unit</label>
<input name="wbs_unit" type="text" class="form-control w450" value="{{ Input::old('wbs_unit') }}">
@if ($errors->has('wbs_unit')) <p class="help-block">{{ $errors->first('wbs_unit') }}</p> @endif
</div>
<div class="form-group">
<button type="submit" class="btn btn-sm btn-primary">create</button>
</div>
{{ Form::close() }}
我不能发表任何图像:(
这样有利于me..please
这个链接http://file.tpops.net/?d=dXBsb2Fkcy9NSUZUQUgvZXJycnIuanBn&t=1420749231&h=2f4f95fc85a221fd7c60ea40b491ffed使用该用户名和密码的用户是tpops和密码akses链路tpops2015 – MTeguhFh
因为你不能张贴任何图像,有什么错误?你能正确var_dump'$模型'? – user2094178