1
<td>
{{Form::label('start_date', 'Start Date', array('class' => 'awesome'));}}
<input type="date" name ="start_date" class="input-block-level" placeholder="Start Date" />
</td>
<td>
{{Form::label('end_date', 'End Date', array('class' => 'awesome'));}}
<input type="date" name ="end_date" class="input-block-level" placeholder="End Date" />
</td>
</tr>
<tr>
<td>
{{ Form::text('answer[]', null, array('class'=>'input-block-level', 'placeholder'=>'Option')) }}
{{ Form::text('answer[]', null, array('class'=>'input-block-level', 'placeholder'=>'Option')) }}
{{ Form::text('answer[]', null, array('class'=>'input-block-level', 'placeholder'=>'Option')) }}
{{ Form::text('answer[]', null, array('class'=>'input-block-level', 'placeholder'=>'Option')) }}
</td>
</tr>
在這裏,我必須做一些驗證,如果錯誤我需要重定向到預裝的數據在同一個頁面..
if ($validator->fails())
{
return Redirect::back()->withErrors($validator)->withInput();
}
答案[ ]被陣列瓶頸在這裏.. 輸入是不工作陣列..它顯示以下錯誤
ErrorException
htmlentities() expects parameter 1 to be string, array given (View: C:\xampp\htdocs\sms\app\views\questions\create.blade.php)
有什麼想法?