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