laravel-value-objects

Community

Immutable domain value objects for Laravel.

Authornextplus896
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Laravel applications often need robust representations of core domain concepts. This Skill provides a pattern to model domain values as immutable objects that encapsulate rules, ensure safe equality, and prevent unintended mutations across the system.

Core Features & Use Cases

  • Immutability with readonly properties to guarantee safe value semantics.
  • Static factory methods for expressive, intention-revealing construction.
  • Encapsulated domain logic: validation and behavior within the value object.
  • Common domain value examples: money, process result, coordinates, and email addresses.
  • Use Case: Represent monetary amounts with currency, perform calculations without mutating originals.

Quick Start

In a Laravel project, define a Money value object following the Money.php pattern under app/Values, then use Money::fromDollars(29.99) to create amounts and perform adds or multiplications as needed.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: laravel-value-objects
Download link: https://github.com/nextplus896/durra-alaseel/archive/main.zip#laravel-value-objects

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.