PHPackages                             framesnpictures-laravel/dto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. framesnpictures-laravel/dto

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

framesnpictures-laravel/dto
===========================

Universal Data Transport Objects

0.6.0(4y ago)01.1k2PHP

Since Nov 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bhoopal10/dto)[ Packagist](https://packagist.org/packages/framesnpictures-laravel/dto)[ RSS](/packages/framesnpictures-laravel-dto/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (4)Versions (38)Used By (2)

Universal Data Transfer and Transformation Object Library
=========================================================

[](#universal-data-transfer-and-transformation-object-library)

[![Latest Stable Version](https://camo.githubusercontent.com/e9f19f2ce160dccc43c02fe6bc16cb4604c52554c8a97e493fcf5558e7d355c9/68747470733a2f2f706f7365722e707567782e6f72672f6672616d65736e70696374757265732f756e6976657273616c2d64746f2f762f737461626c65)](https://packagist.org/packages/framesnpictures/universal-dto)[![Total Downloads](https://camo.githubusercontent.com/7cd0ee2362db2ef7ed50b31478b605f8d51cf1860045b7022f7707d81631ea72/68747470733a2f2f706f7365722e707567782e6f72672f6672616d65736e70696374757265732f756e6976657273616c2d64746f2f646f776e6c6f616473)](https://packagist.org/packages/framesnpictures/universal-dto)[![Latest Unstable Version](https://camo.githubusercontent.com/b5609ad842f457a0ce1e8610a08395e07473edb4c778030ec3ace0bfe7380190/68747470733a2f2f706f7365722e707567782e6f72672f6672616d65736e70696374757265732f756e6976657273616c2d64746f2f762f756e737461626c65)](https://packagist.org/packages/framesnpictures/universal-dto)[![License](https://camo.githubusercontent.com/e5b471039bc5fc268c5b867b12a573f06e6f133e2f8c1a1b3ccafe82c7077525/68747470733a2f2f706f7365722e707567782e6f72672f6672616d65736e70696374757265732f756e6976657273616c2d64746f2f6c6963656e7365)](https://packagist.org/packages/framesnpictures/universal-dto)[![Production Environment](https://camo.githubusercontent.com/4fc778841dba51c30bcbb0ba94416d6f6628d8fc6a1559a0a9c9f3e9cf243957/68747470733a2f2f7472617669732d63692e6f72672f4672616d65734e50696374757265732f64746f2e7376673f6272616e63683d6d6173746572 "Production Environment")](https://camo.githubusercontent.com/4fc778841dba51c30bcbb0ba94416d6f6628d8fc6a1559a0a9c9f3e9cf243957/68747470733a2f2f7472617669732d63692e6f72672f4672616d65734e50696374757265732f64746f2e7376673f6272616e63683d6d6173746572)

Installation
------------

[](#installation)

```
php composer require framespictures/dto

```

Note
----

[](#note)

```
PLEASE NOTE THIS PROJECT IS WORK IN PROGRESS! API MAY CHANGE WITHOUT WARNING!
IF YOU WANT TO INCORPORATE IT INTO YOUR PROJECT PLEASE STICK TO ONE PARTICULAR VERSION.

```

Data Transfer Object Theory
---------------------------

[](#data-transfer-object-theory)

A Data Transfer Object is an object that is used to encapsulate data, and send it from one subsystem of an application to another. DTOs are most commonly used by the Services layer in an N-Tier application to transfer data between itself and the UI layer. The main benefit here is that it reduces the amount of data that needs to be sent across the wire in distributed applications. They also make great models in the MVC pattern.

Another use for DTOs can be to encapsulate parameters for method calls. This can be useful if a method takes more than 4 or 5 parameters.

Using DTOs internally vastly simplifies PHP code allowing for IDE code hinting and avoiding mistakes in array string keys which is a common source of errors. It also greatly improves refactoring.

Using it in Repository Pattern in conjunction with Eloquent, allows for true logic and persistence separation.

Usual Use Cases
---------------

[](#usual-use-cases)

### API Output

[](#api-output)

### Array to Structured Model Conversion

[](#array-to-structured-model-conversion)

### Data Mapping

[](#data-mapping)

### Input Mapping

[](#input-mapping)

### Data Transformation, Cleanup and Chaining

[](#data-transformation-cleanup-and-chaining)

### Code Driven Sets

[](#code-driven-sets)

Classes
-------

[](#classes)

### Basic DTO

[](#basic-dto)

### Flexible DTO

[](#flexible-dto)

### Mapper

[](#mapper)

#### Basic functionality

[](#basic-functionality)

#### Multi level mapping

[](#multi-level-mapping)

#### Advanced mapping

[](#advanced-mapping)

### Set Model

[](#set-model)

#### Database Set

[](#database-set)

### Config Models

[](#config-models)

#### Laravel Config

[](#laravel-config)

### Class Maps

[](#class-maps)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~72 days

Recently: every ~273 days

Total

33

Last Release

1512d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/945b8256f470d7617b9a4b0e85d9f7289a2a404a4578727bbb753a6ab97fe24b?d=identicon)[bhoopal10](/maintainers/bhoopal10)

---

Top Contributors

[![chris97pl](https://avatars.githubusercontent.com/u/1183990?v=4)](https://github.com/chris97pl "chris97pl (115 commits)")[![bhoopal10](https://avatars.githubusercontent.com/u/5277986?v=4)](https://github.com/bhoopal10 "bhoopal10 (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/framesnpictures-laravel-dto/health.svg)

```
[![Health](https://phpackages.com/badges/framesnpictures-laravel-dto/health.svg)](https://phpackages.com/packages/framesnpictures-laravel-dto)
```

###  Alternatives

[jofrysutanto/windsor

YAML-ised Configuration for ACF

549.2k](/packages/jofrysutanto-windsor)[jshannon63/jsoncollect

Supercharge your JSON using collections

154.9k1](/packages/jshannon63-jsoncollect)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
