Skip to content

Data-Helpers

A powerful, framework-agnostic PHP library for accessing, transforming, and mapping complex nested data structures with ease.
Data Helpers - Framework-agnostic PHP library for data manipulation, transformation, and validation

DataAccessor

Read nested data with dot notation and wildcards. Analyze data structure with type information. Type-safe getters for arrays, objects, Collections, and Models.

DataMutator

Modify nested data structures safely. Set, merge, and unset values with wildcard support.

DataMapper

Transform data structures with templates and pipelines. 40+ built-in filters and custom operators.

DataFilter

Query and filter data with SQL-like API. WHERE, ORDER BY, LIMIT, and custom operators.

SimpleDTO

Immutable Data Transfer Objects with validation, casting, and framework integration.

Framework-Agnostic

Works with Laravel, Symfony, Doctrine, or plain PHP. Zero required dependencies.

// From this messy API response...
$apiResponse = [
'data' => [
'departments' => [
['users' => [['email' => 'alice@example.com'], ['email' => 'bob@example.com']]],
['users' => [['email' => 'charlie@example.com']]],
],
],
];
// ...to this clean result in one line
$accessor = new DataAccessor($apiResponse);
$emails = $accessor->get('data.departments.*.users.*.email');
// Result: ['alice@example.com', 'bob@example.com', 'charlie@example.com']
  • Stop writing nested loops - Use dot notation and wildcards instead
  • Transform data with ease - Map between different formats without repetitive code
  • Type-safe and well-tested - PHPStan Level 9 with 2900+ tests
  • Framework-agnostic - Works anywhere with smart framework detection
  • Blazing fast - Up to 3.7x faster than traditional serializers

Installation

Install Data Helpers via Composer and get started in minutes.

Install now →

API Reference

Complete API documentation for all classes and methods.

Read docs →