} $attributes */ public function handle(Project $sourceProject, array $attributes): ProjectTemplate { $copyAreas = array_values(Arr::get($attributes, 'copy_areas', [])); return ProjectTemplate::query()->create([ 'project_id' => null, 'source_project_id' => $sourceProject->id, 'name' => $attributes['name'], 'slug' => $attributes['slug'], 'is_published' => true, 'copy_areas' => $this->duplicateProjectConfiguration->normalizeCopyAreas($copyAreas), 'configuration_snapshot' => $this->duplicateProjectConfiguration->export($sourceProject, $copyAreas), ]); } }