Works perfectly now! Thank you so much! My last question; The answers coming from an array like:
<input name="question_id" value="green"> <input name="question_id" value="red"> <input name="question_id" value="blue">
So is that proper way to update the pivot table this way?
$input = $request->input('question_id'); $user->answers()->detach(); $user->answers()->attach($input);
I also think I don't really need auto increment id on pivot table too, right?