konsulting/laravel-extend-collections
Extends Laravel's Collection class with handy macros and helper methods for more expressive, concise array and collection transformations. A drop-in package for cleaner, more readable collection pipelines in Laravel applications.
php artisan vendor:publish).fromDot helper and its relationship to Laravel’s Arr::undot(). That is the core behavior changed in 0.3.1.mail.host — into nested arrays before validation or persistence.$nested = fromDot([
'mail.host' => 'smtp.example.com',
'mail.port' => 587,
]);
fromDot at the boundary where flat data enters your domain: request normalization, config importers, or settings loaders.Arr::dot() when you need round-tripping: flatten for storage or comparison, then fromDot back to nested form.fromDot rather than calling undot() directly so you inherit the package’s fixed behavior.fromDot being “overzealous” with undot, meaning keys that should have remained literal dotted keys were being split unintentionally.Arr::dot($nested) should reproduce your original flat array when the data is purely dot-keyed.foo.bar, not a nested path) are the main edge case to verify. Add a regression test if your application relies on them.fromDot calls and assert exact array shapes in tests rather than relying on assertArraySubset-style checks, which can hide key-splitting regressions.How can I help you explore Laravel packages today?