Defining Schemas
Learn the core model: identifiers, properties, optional, nullable, defaults, nested objects, and schema composition.
Epsicube Schema is the framework’s declarative data description layer. It is used to define structured data once, then reuse the same definition for validation, options management, Filament UIs, JSON Schema export, and interactive CLI prompts.
The package is built around Epsicube\Schemas\Schema and a set of property classes in Epsicube\Schemas\Properties\*.
At a high level, a schema is:
Each property describes:
nullStringPropertyBooleanPropertyIntegerPropertyFloatPropertyEnumPropertyObjectPropertyArrayPropertyCreate a schema with Schema::create() and append properties with ->append([...]).
Use ->validated($data) or ->toValidator($data) to validate incoming data and apply defaults.
Use the same schema to generate:
->toJsonSchema()->toFilamentComponents(...)->toExecutedPrompts(...)Defining Schemas
Learn the core model: identifiers, properties, optional, nullable, defaults, nested objects, and schema composition.
Property Types
Browse a structured reference of every built-in property with signatures, fluent methods, behaviors, and examples.
Using Schemas
See how to validate payloads, apply defaults, scope schemas with only() and except(), and use them in runtime flows.
Export Schemas
Understand how the same schema becomes JSON Schema, Filament components, Laravel prompts, and Laravel validators.
composer require epsicube/schemas