parent()->template() == 'project' ? $newFile->parent() : $newFile->parent()->parents()->findBy('template', 'project'); if ($project) { $project->rebuildStepsCache(); // Invalider aussi le cache des notifications (commentaires sur fichiers, etc.) $project->invalidateNotificationsCache(); } };