authorize('customerBelongsToService', $customer); $answersID = Answer::whereIn('id', $request->answers)->pluck('id')->toArray(); $customer->answers()->sync($answersID); return \response()->json(); } }