I have a drop-down name called designation, where the user can add some information against the multiple designation. If I add 1 entry against 3 notations, then I also need to select them during verification and editing time.
Ex: selected id {5,7,8} from [1 to 10].
<select id="forWhom" name="forWhom[]" multiple class="form-control chosen"> <option value="">--- Select ---</option> @foreach ($desgInfo as $key => $value) <option value="{{ $key }}" {{ old('forWhom',$info->forWhom) == $key ? 'selected' : ''}} />{{ $value }}</option> @endforeach </select>
After adding this information, I save the selected identifier in a comma delimiter (,) ie 5,7,8.
How can I do this in laravel 5.4
source share