I'm trying to understand why my checkboxes are not being submitted as a user_id array, can anyone help me figure out why? I'm obviously doing something wrong but I can't figure it out.
// View
{{ Form::model($process, array('route' => array('judi.processes.update', $process->id), 'method' => 'put') ) }}
@foreach ($assessors->users as $assessor)
{{ Form::checkbox( 'user_id[]', $assessor->id, checkboxState( $assessor->id, $process->users()->lists('user_id') ) ) }}
@endforeach
{{ Form::submit('Submit') }}
{{ Form::close() }}
// Controller
$users = Input::get('user_id');
// Output
Users
[
0 =>'1'
1 =>'106'
2 =>'107'
]
// Looking for
Users
'user_id' = [
0 => '1',
1 => '106',
2 => '107'
]
Thanks