I have this in my view:
And i have only one field in my DB and that is driverslicensetype
how to save this to the DB so that whatever types user chooses will save the picked ones like this:
/* ABCD
*
* A: 0 No 1 AM 2 A1 3 A2 4 A;
* B: 0 No 1 B1 2 B 3 BE
* C: 0 No 1 C1 2 C1E 3 C 4 CE
* D: 0 No 1 D1 2 D1E 3 D 4 DE
*/
so if user chooses A and B only the saved number should be 3300
A B and C would be 3230
A B C D would be 3233
B C1 would be 0210
and so on, i hope you understand.
So i have made this in my view:
<div class="col">
<?php
$driverslicense_types = [
'AM',
'A1',
'A2',
'A',
'B1',
'B',
'BE',
'C1',
'C1E',
'C',
'CE',
'D1',
'D1E',
'D',
'DE'
]
?>
@foreach($driverslicense_types as $type)
<div class="col-md-3">
{!! Form::checkbox('driverslicense_type'.$type,'1', false, ['id'=>'driverslicense_type'.$type, 'class' => 'checkbox-style']) !!}
{!! Form::label('driverslicense_type'.$type, $type, ['id'=>'driverslicense_type'.$type, 'class'=>'checkbox-style-3-label']) !!}
</div>
@endforeach
</div>
So now i don't know how to save this in my controller, anyone could help?