PHPackages                             pepperfm/ssd-for-laravel - 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. pepperfm/ssd-for-laravel

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

pepperfm/ssd-for-laravel
========================

Simple Slim DTO

0.2.0(7mo ago)023.7k↓21.6%1MITPHPPHP ^8.2CI passing

Since Feb 25Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/pepperfm/ssd-for-laravel)[ Packagist](https://packagist.org/packages/pepperfm/ssd-for-laravel)[ Docs](https://github.com/pepperfm/ssd-for-laravel)[ RSS](/packages/pepperfm-ssd-for-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (17)Used By (1)

Simple Slim DTO
===============

[](#simple-slim-dto)

[![Latest Version on Packagist](https://camo.githubusercontent.com/ad1bf11cc4738a6322dff8207494e795ce07c6009b33dc024294f47999328d1a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706570706572666d2f7373642d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepperfm/ssd-for-laravel)[![Total Downloads](https://camo.githubusercontent.com/7926de4999dc1cc55ee1d09aeb050fc1b587f4d04931f816f77aba4c67f47fe8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706570706572666d2f7373642d666f722d6c61726176656c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/pepperfm/ssd-for-laravel)[![GitHub Actions](https://github.com/pepperfm/ssd-for-laravel/actions/workflows/main.yml/badge.svg)](https://github.com/pepperfm/ssd-for-laravel/actions/workflows/main.yml/badge.svg)

Easily describe your data with minimal boilerplate. No magic, no transformations — just pure, readable schema.

Typehint your data in camelCase. No hidden transformations or data mutations. Clean, readable, and intuitive code. Just a simple class to map your data, following the KISS💋 principle.

Tip

[Full Package Description](https://docs.pepperfm.com/simple-slim-dto)

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

[](#installation)

```
composer r pepperfm/ssd-for-laravel
```

Usage
-----

[](#usage)

Extends your class from BaseDto and define your data

```
class ResponseWrapperDto extends BaseDto
{
    public array $data;

    public array $links;

    public array $metaData;
}
```

### Base case

[](#base-case)

You can create the object like this:

```
ResponseWrapperDto::make([
    'data' => $response['data'],
    'links' => $response['links'],
    'meta_data' => $response['meta'],
])
```

```
use Pepperfm\DonationAlerts\Attributes\ToIterable;

class ResponseWrapperDto extends BaseDto
{
    #[ToIterable(ResponseDataDto::class)]
    public array $data;

    public array $links;

    public array $metaData;
}
```

Output:

```
/**
 * @var array $data
 */
$data = $dto->data;
```

### Extended cases

[](#extended-cases)

```
ResponseWrapperDto::make(literal(
    data: $response['data'],
    links: $response['links'],
    meta: $response['meta'],
))
```

```
new ResponseWrapperDto(
    data: $response['data'],
    links: $response['links'],
    meta: $response['meta'],
)
```

```
ResponseWrapperDto::make([
    'data' => $response['data'],
    'links' => $response['links'],
    'meta' => $response['meta'],
])
```

```
new ResponseWrapperDto([
    'data' => $response['data'],
    'links' => $response['links'],
    'meta' => $response['meta'],
])
```

---

Warning

Only for collections (non-native array)

```
use Pepperfm\DonationAlerts\Attributes\ToIterable;

class ResponseWrapperDto extends BaseDto
{
    #[ToIterable(ResponseDataDto::class, \Illuminate\Database\Eloquent\Collection::class)]
    public \Illuminate\Support\Collection $data;

    public array $links;

    public array $metaData;
}
```

Output:

```
/** @var \Illuminate\Database\Eloquent\Collection $data */
$data = $dto->data;
```

Note

In this version this package will transform any snake\_case variables to camelCase

I started with this because I like this approach

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Dmitry Gaponenko](https://pepperfm.com)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance63

Regular maintenance activity

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

Every ~15 days

Recently: every ~32 days

Total

16

Last Release

226d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87b33c1f84ded521a768afdbd204f1a1c2cd7519477a2f8bdb2e8b7cba030d09?d=identicon)[PepperFM](/maintainers/PepperFM)

---

Top Contributors

[![pepperfm](https://avatars.githubusercontent.com/u/36007880?v=4)](https://github.com/pepperfm "pepperfm (28 commits)")

---

Tags

schematypehintSimpledtopepperfmssd-for-laravel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/pepperfm-ssd-for-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/pepperfm-ssd-for-laravel/health.svg)](https://phpackages.com/packages/pepperfm-ssd-for-laravel)
```

###  Alternatives

[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k27.6M92](/packages/simplesoftwareio-simple-qrcode)[league/config

Define configuration arrays with strict schemas and access values with dot notation

564302.2M24](/packages/league-config)[rinvex/countries

Rinvex Countries is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.

1.7k7.4M48](/packages/rinvex-countries)[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

49644.8M97](/packages/marc-mabe-php-enum)[torann/json-ld

Extremely simple JSON-LD markup generator.

149620.7k1](/packages/torann-json-ld)[brick/schema

Schema.org library for PHP

5163.7k1](/packages/brick-schema)

PHPackages © 2026

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