Apr 15, 2015
0
Level 1
how to insert an array with radio button per row
I want to insert a different status for each student per row where my status are (present, absent,late,others)
Here's my view
List of Students Enrolled </tr>
</thead>
<tbody>
@foreach ($users as $users)
<tr>
<td>{{ $users->student_id }} </td>
<td>{{ $users->student_firstname }} {{ $users->student_lastname }}</td>
<td>{{ Form::radio('student['.$users->student_id.'][status]', 'present' , true) }}</td>
<td>{{ Form::radio('student['.$users->student_id.'][status]', 'late' ) }}</td>
<td>{{ Form::radio('student['.$users->student_id.'][status]', 'absent') }}</td>
<td>{{ Form::radio('student['.$users->student_id.'][status]', 'others') }}</td>
<td>{{ Form::text('student['.$users->student_id.'][comment]') }}</td>
@endforeach
Is there anyway i can insert this inside a function in my controller?
Please or to participate in this conversation.