PHPackages                             mistery23/laravel-value-objects - 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. [Database &amp; ORM](/categories/database)
4. /
5. mistery23/laravel-value-objects

AbandonedArchivedPackage[Database &amp; ORM](/categories/database)

mistery23/laravel-value-objects
===============================

laravel object relations

v1.1.4(6y ago)2157MITPHPPHP ^7.2

Since Dec 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mistery23/laravel-value-objects)[ Packagist](https://packagist.org/packages/mistery23/laravel-value-objects)[ Docs](https://github.com/mistery23/eloquent-object-relations)[ RSS](/packages/mistery23-laravel-value-objects/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (8)Used By (0)

Laravel value objects
=====================

[](#laravel-value-objects)

Install
-------

[](#install)

```
composer require mistery23/laravel-value-objects

```

Features
--------

[](#features)

Additional functional for eloquent casts. This package can you cast your attribute in value objects wrap.

If use `id` format `uuid` (`ramsey/uuid`), you can use `Mistery23\ValueObjects\Objects\Id`. For the provide back capability in relations, in this package use `mistery23/eloquent-object-relations` package.

You can use the `Mistery23\ValueObjects\Objects\EmailAddress` for your email attribute. You can extend the `Mistery23\ValueObjects\Objects\EnumType` for your status attribute (`marc-mabe/php-enum`).

If you want to create own value object type, you can extend `Mistery23\ValueObjects\Objects\NativeType` for simple object, or implement `Mistery23\ValueObjects\ValueObjectInterface`.

---

Using
-----

[](#using)

```
use Mistery23\ValueObjects\HasValueObjects;

 * ```php
 *      class User extends Model {
 *
 *          use HasValueObjects;
 *
 *
 *          protected $casts = [
 *              'email' => EmailAddress::class
 *          ];
 *      }

```

---

File Tree
---------

[](#file-tree)

```
|-- .gitignore
|-- LICENSE.MD
|-- README.MD
|-- composer.json
`-- src
    |-- HasValueObjects.php
    |-- Objects
    |   |-- EmailAddress.php
    |   |-- EnumType.php
    |   |-- Id.php
    |   `-- NativeType.php
    |-- Util.php
    `-- ValueObjectInterface.php
```

- Tree command can be installed using brew: brew install tree
- File tree generated using command tree -a -I '.idea|.git|node\_modules|vendor|storage|tests|composer.lock'

---

License
-------

[](#license)

This package is free software distributed under the terms of the [MIT license](https://opensource.org/licenses/MIT). Enjoy!

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

Total

7

Last Release

2334d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/86dc8a5e2e48c6a2223042e929b4d306ce437495a3c4aaf0e2e945355eda7789?d=identicon)[mistery23](/maintainers/mistery23)

---

Top Contributors

[![alexandrbarabolia](https://avatars.githubusercontent.com/u/17147023?v=4)](https://github.com/alexandrbarabolia "alexandrbarabolia (7 commits)")

---

Tags

laravelvomodeleloquentvalue objectsdddcasts

### Embed Badge

![Health badge](/badges/mistery23-laravel-value-objects/health.svg)

```
[![Health](https://phpackages.com/badges/mistery23-laravel-value-objects/health.svg)](https://phpackages.com/packages/mistery23-laravel-value-objects)
```

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[wendelladriel/laravel-lift

Take your Eloquent Models to the next level

70046.8k](/packages/wendelladriel-laravel-lift)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)

PHPackages © 2026

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