PHPackages                             kakaprodo/custom-data - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. kakaprodo/custom-data

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

kakaprodo/custom-data
=====================

A Laravel package that wraps function arguments together into a single CustomData class allowing separate processing and validation for each argument.

v2.3.53(9mo ago)74.0k↓50%5MITPHPPHP &gt;=8.0

Since Jul 28Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/kakaprodo/custom-data)[ Packagist](https://packagist.org/packages/kakaprodo/custom-data)[ RSS](/packages/kakaprodo-custom-data/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (44)Used By (5)

Custom Data
===========

[](#custom-data)

[Official Documentation](https://yupidoc.com/projects/customdata/preview)
-------------------------------------------------------------------------

[](#official-documentation)

A Laravel package that wraps function arguments together into a single CustomData class allowing separate processing and validation for each argument.

```
class CreateUserData extends CustomData
{
    protected function expectedProperties(): array
    {
        return [
            'name' => $this->dataType()->string(),
            'email' => $this->dataType()->string(),
            'password' => $this->dataType()->string(),
            'age?' => $this->dataType()->string(),
            'sexe' => $this->dataType()->inArray(['M','F'])
        ];
    }
}
```

And then call it this way:

```
CreateUserData::make([
    'name' => 'kakaprodo',
    'email' => 'example@gmail.com',
    'password' => 'is_unique_pass',
    'sexe' => 'M'
]);
```

And if you like to decouple your code with small classes called Action , then you are at the right place:

```
class CreateUserAction extends CustomActionBuilder
{
   public function handle(CreateUserData $data)
   {
       return $data->onlyValidated();
   }
}
```

And then we call our action this way:

```
CreateUserAction::process([
    'name' => 'kakaprodo',
    'email' => 'example@gmail.com',
    'password' => 'is_unique_pass',
    'sexe' => 'M'
]);
```

Features
--------

[](#features)

- Combine several function arguments into one class called CustomData
- Validate each argument a little bit the way TypeScript does it in Javascript
- Support the definition of Laravel FormValidation rules
- Support Action classes in which CustomData can be injected
- Support The Ability to Queue Action class
- Support helper command to generate Action and CustomData classes

You can find here the [Official Documentation](https://yupidoc.com/projects/customdata/preview)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance58

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~28 days

Total

40

Last Release

277d ago

Major Versions

v1.2.0 → v2.0.02023-11-10

PHP version history (2 changes)v1.9.2PHP &gt;=7.0

v2.3.52PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/988cbdacb19b632229a0cf2746b84b6cdbd4a81624b86a5ad4b1e27db48778a3?d=identicon)[kakaprodo](/maintainers/kakaprodo)

---

Top Contributors

[![kakaprodo](https://avatars.githubusercontent.com/u/30261670?v=4)](https://github.com/kakaprodo "kakaprodo (106 commits)")

---

Tags

phplaravel-datakakaprodolaravel custom datalaravel typescriptphp typescript

### Embed Badge

![Health badge](/badges/kakaprodo-custom-data/health.svg)

```
[![Health](https://phpackages.com/badges/kakaprodo-custom-data/health.svg)](https://phpackages.com/packages/kakaprodo-custom-data)
```

###  Alternatives

[basillangevin/laravel-data-json-schemas

Transforms Spatie Data objects into JSON Schemas with built-in validation

1312.2k1](/packages/basillangevin-laravel-data-json-schemas)

PHPackages © 2026

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