Skip to content

Commit

Permalink
Merge pull request #663 from alexrififi/patch-1
Browse files Browse the repository at this point in the history
[docs] Update pipeline.md
  • Loading branch information
rubenvanassche authored Feb 16, 2024
2 parents b53f2b0 + 1af068c commit afead66
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions docs/advanced-usage/pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ class SongData extends Data

public static function prepareForPipeline(array $properties): array
{
$collection = collect($properties);
$collection->put('metadata', $collection->only(['release_year', 'producer']));

return $collection->toArray();
$properties['metadata'] = Arr::only($properties, ['release_year', 'producer']);

return $properties;
}
}
```
Expand Down

0 comments on commit afead66

Please sign in to comment.