We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a40c658 commit ae79bf0Copy full SHA for ae79bf0
src/Illuminate/Collections/Arr.php
@@ -476,9 +476,7 @@ public static function keyBy($array, $keyBy)
476
*/
477
public static function prependKeysWith($array, $prependWith)
478
{
479
- return Collection::make($array)->mapWithKeys(function ($item, $key) use ($prependWith) {
480
- return [$prependWith.$key => $item];
481
- })->all();
+ return static::mapWithKeys($array, fn ($item, $key) => [$prependWith.$key => $item]);
482
}
483
484
/**
0 commit comments