Laravel:输入旧的单选按钮

时间:2015-04-16 07:52:54

标签: php laravel laravel-4 laravel-5 blade

我想用我的单选按钮

插入Input :: old
<td>{{ Form::radio('student['.$user->student_id.'][status]', 'present', (Input::old('student') == 'present')) }}</td>
<td>{{ Form::radio('student['.$user->student_id.'][status]', 'late', (Input::old('student') == 'late')) }}</td>
<td>{{ Form::radio('student['.$user->student_id.'][status]', 'absent', (Input::old('student') == 'absent'))  }}</td>
<td>{{ Form::radio('student['.$user->student_id.'][status]', 'others', (Input::old('student') == 'others'))  }}</td>

我尝试了这个并且它不起作用:(请帮忙

1 个答案:

答案 0 :(得分:1)

试试这个

{{ Form::radio('student', 'present', (Input::old('student') == 'present'), array('id'=>'present', 'class'=>'radio')) }}