I need to sync 3 values in a table in which, I have 3 fields in a table as difficulty_level_id
, sbj_type_id
and subject_id
and I have setup this thing in my Controller as:
public function store(Request $request)
{
$difficulty_level = DifficultyLevel::find(1);
$difficulty_level->sbj_types()->sync($request->veryeasy, false);
return 'done';
}
but the problem is that it only attaches 2 values as difficulty_level_id
and sbj_type_id
. How I sync the third values as subject_id
, any help will be appreciated?