$exerciseId, 'skill_id' => $skillId, ]; } if (!empty($data)) { ExerciseSkill::insert($data); } } }