laravel提交后出现的问题
Argument 1 passed to Illuminate\Database\Eloquent\Relations\BelongsToMany::formatSyncList() must be of the type array,
string given, called in D:\www\program\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Relations\BelongsToMany.php on line 771 and defined

这段提示,你提交的数据不是一个数据,那就说明你页面的传递参数写错了,我这边是

多选框未改正前

<select multiple class="form-control select2" name="comm_type"  style="width: 100%;">

改正后

<select multiple class="form-control select2" name="comm_type[]"  style="width: 100%;">

就是忘记name值里面加[]