PHPackages                             laraditz/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. laraditz/dto

ActiveLibrary

laraditz/dto
============

A simple data transfer object

1.0.0(5y ago)059MITPHPPHP ^7.2.5

Since Jul 15Pushed 5y agoCompare

[ Source](https://github.com/laraditz/dto)[ Packagist](https://packagist.org/packages/laraditz/dto)[ RSS](/packages/laraditz-dto/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Data Transfer Object
====================

[](#data-transfer-object)

[![Latest Stable Version](https://camo.githubusercontent.com/9648717b23ffed8cd5df66078ca0932ceef878d626df3549da85d5dccff320d0/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616469747a2f64746f2f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/laraditz/dto)[![Total Downloads](https://camo.githubusercontent.com/882fecd116e5b463cabdeb63f0c8c687305545dd66ba58e7a30205afb0965ca9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6172616469747a2f616374696f6e3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laraditz/dto)[![License](https://camo.githubusercontent.com/538412b604fada609db5f2272e1f4896388d6cee1dac779bdb63507569d7cd08/68747470733a2f2f706f7365722e707567782e6f72672f6c6172616469747a2f64746f2f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/laraditz/dto)[![StyleCI](https://camo.githubusercontent.com/3ebb9759d3748ad0fa1b6c7f477c842a04b4bdc799f75a8b68f3c6d585d07be8/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f373534383938362f736869656c643f7374796c653d737175617265)](https://github.com/laraditz/dto)

A simple data transfer object. Use with Laravel/Lumen or without framework.

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

[](#installation)

Via Composer

```
$ composer require laraditz/dto
```

Configuration
-------------

[](#configuration)

The Laravel and Lumen configurations vary slightly, so here are the instructions for each of the frameworks.

### Laravel

[](#laravel)

Edit the `config/app.php` file and add the following line to register the service provider:

```
'providers' => [
    ...
    Laraditz\DTO\DTOServiceProvider::class,
    ...
],
```

> Tip: If you're on Laravel version **5.5** or higher, you can skip this part of the setup in favour of the Auto-Discovery feature.

### Lumen

[](#lumen)

Edit the `bootstrap/app.php` file and add the following line to register the service provider:

```
...
$app->register(Laraditz\DTO\DTOServiceProvider::class);
...
```

### Others

[](#others)

Import the `Laraditz\DTO\DTO` class like usual.

Usage
-----

[](#usage)

You can use `php artisan make:dto ` to create your action. For example, `php artisan make:dto PostData`. By default you can find it in `App/DTO` folder.

Sample DTO file generated as below. For non-laravel usage, can simply follow below example as well. After that just add your attributes.

```
namespace App\DTO;

use Laraditz\DTO\DTO;

class PostData extends DTO
{
    public $title;

    public $content;
}
```

Change log
----------

[](#change-log)

Please see the [changelog](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Raditz Farhan](https://github.com/raditzfarhan)

License
-------

[](#license)

MIT. Please see the [license file](LICENSE) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2134d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1203676?v=4)[Raditz Farhan](/maintainers/raditzfarhan)[@raditzfarhan](https://github.com/raditzfarhan)

---

Top Contributors

[![raditzfarhan](https://avatars.githubusercontent.com/u/1203676?v=4)](https://github.com/raditzfarhan "raditzfarhan (6 commits)")

---

Tags

laravellumenSimpledata-transfer-objectparameterdto

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[wendelladriel/laravel-validated-dto

Data Transfer Objects with validation for Laravel applications

759569.4k13](/packages/wendelladriel-laravel-validated-dto)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[cerbero/laravel-dto

Data Transfer Object (DTO) for Laravel

5813.6k](/packages/cerbero-laravel-dto)

PHPackages © 2026

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