lundi 14 mars 2016

Multi Select posting only single value in Laravel 5.2

This is about posting multiple Select values to controller from a dropdown in Laravel Blade.

I have below code in Blade. As per below code, we can select multiple values. Html implementation can be found here: http://ift.tt/1M32DMB

<div class="form-group">
    <select  name="SkillID[]" class="select2_multiple form-control" multiple="multiple">
        @foreach($Skills as $Skill)
            <option value="{!! $Skill->SkillID !!}">{!! $Skill->Skill !!}</option>
        @endforeach
    </select>
</div>

On opening the web page in the above link given, we can search for the work "Select Multiple". Which shows we can select multiple values.

What's the problem

When I post the form, it only shows last selected value.

Although I am using SkillID[] as name but stil only value is getting posted. Can you guide me to the right direction?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire