flow-php/array-dot
Flow PHP Array Dot adds easy dot-notation access to PHP arrays. Read, set, and manipulate deeply nested values with a clean API—ideal for config data, decoded JSON, and complex structures—making array handling clearer and less error-prone.
.env or service configuration overrides (e.g., config('app.services.api.key')).array_dot::set($data, 'user.address', $address)).array_dot::get('request.input.user.profile')).validate('user.address.city', 'required')).protected $appends = ['user.address.formatted']).composer require flow-php/array-dot with zero Laravel-specific hooks.array_walk_recursive for critical paths.memory_get_usage().array_dot::merge()) may be needed for partial updates.null silently. Add runtime validation for critical paths (e.g., array_dot::has('path')).flow-php/types, but ensure no breaking changes if adopting other Flow-PHP tools.Arr::dot() or collect()->dot() already cover core needs? If so, what incremental benefits does array-dot offer?array-dot for complex ones) mitigate risks?Illuminate\Support\Arr)?Arr::dot() (simpler, but less feature-rich).spatie/array-to-object (for object mapping).league/pipe (for ETL pipelines).$this->app->singleton('array-dot', fn() => new \Flow\ArrayDot\ArrayDot());
ArrayDot::get('path')) to mirror Laravel’s Arr pattern.public function handle($request, Closure $next) {
$request->merge(array_dot('request.input.nested', $request->all()));
return $next($request);
}
$this->validate($request, [
'user.address.city' => 'required|string',
]);
array-dot initialization and configuration.Arr::dot() to avoid naming conflicts.laravel-validator or spatie/laravel-validation.fruitcake/laravel-cors, guzzlehttp/guzzle, etc., for request/response handling.user->address->city → user.address.city).composer require flow-php/array-dot
array_dot in:
array_dot::safeGet()).array_dot::get('user.*')).flow-php/array-dot for breaking changes (e.g., PHP 8.6 compatibility).Arr integration).request.*, config.database.*).array_dot::merge() for partial updates).array_dot::has('path') checks).array_chunk + array_dot).How can I help you explore Laravel packages today?