spatie/array-functions
Handy PHP array utilities from Spatie. Adds small, focused functions in the Spatie namespace (e.g., array_rand_value to pick a random value) to complement built-in array helpers. Install via Composer and use directly in your code.
array_map, array_filter replacements with cleaner syntax).array_pluck_deep, array_where_recursive).array_u* functions if needed).Enumerable).For Executives:
"This package cuts 30–50% of the time spent writing and debugging array utilities in our Laravel apps. For example, replacing a 20-line array_walk_recursive block with array_functions::pluck_deep() saves dev hours and reduces bugs. It’s a low-risk, high-reward investment—MIT-licensed, used by 245+ projects, and maintained by Spatie, a trusted open-source contributor. ROI: Faster feature delivery with negligible cost."
For Engineering:
*"Spatie’s array-functions gives us:
array_where_recursive() replace verbose loops.array_diff_assoc_recursive).For Developers:
*"Imagine never writing foreach loops to flatten nested arrays again. This package adds:
pluck_deep(): Extract values from deeply nested arrays (e.g., ['user' => ['profile' => ['name']]] → ['John']).where_recursive(): Filter arrays with complex conditions (e.g., find all active users in a multi-level structure).composer require spatie/array-functions—no config or migrations.
Perfect for: Data migration scripts, API response transformations, or any code where arrays are the ‘glue’ between systems."*How can I help you explore Laravel packages today?