forceFill([ 'project_template_id' => $template->id, ])->save(); $this->duplicateProjectConfiguration->apply( $project->fresh(), $template->configuration_snapshot ?? [], ); }); } public function reset(Project $project): void { $template = $project->projectTemplate; if ($template === null) { return; } DB::transaction(function () use ($project, $template): void { $this->duplicateProjectConfiguration->apply( $project->fresh(), $template->configuration_snapshot ?? [], ); }); } }