Level 80
but i keep getting error
@ademike Right? So what’s the error? Or do we have to guess…?
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I needed to submit attendence at once using checkboxes, but i keep getting error... in my view i have this, i have about 100 students..
<tbody>
<form method="POST" action="{{Route('attendance.store')}}">
@foreach ($students as $student )
<tr>
<td>{{$student->name}}</td>
<td> <input type="hidden" name="name[]" value="{{$student->id}}" />
<input type="checkbox" name="value[Number 1]" value="{{$student->id}}" />
</td>
</tr>
@endforeach
<tr>
<td><button type="submit">SUbmit </button></td>
</tr>
</form>
</tbody>
The Controller
public function storeStudentAttendance(Request $request)
{
$values = $request->get('value');
foreach ($request->get('name') as $name) {
$newValue = $values[$name] ?? 0;
}
ddd($newValue);
}
I want to save the each attendance into different roles for different student
Please or to participate in this conversation.