teachers()->updateExistingPivot($user->id, [ 'teaching_position' => $data['teaching_position'], 'service_email' => $data['service_email'] ?? null, 'service_phone' => $data['service_phone'] ?? null, 'cabinet' => $data['cabinet'] ?? null, ]); $this->cacheService->clearAllCacheByModel(); } }