enums
OfficialType-safe PHP enums with label and color helpers
System Documentation
What problem does it solve?
PHP projects often rely on constants or magic strings to represent finite sets of values, which leads to bugs and hard-to-maintain code. Backed string enums provide a type-safe, readable alternative that can be used across models, migrations, and UI logic.
Core Features & Use Cases
- Backed string enums for finite value sets in PHP, improving type safety and readability.
- label and color helper methods to derive human-friendly labels and UI colors.
- Seamless integration with Eloquent models through enum casting, enabling direct usage in properties and queries.
Use Case: In a Laravel app, define an enum Status with Draft, Active, and Archived, cast the status column in the model, and call status->label() to render UI labels.
Quick Start
Install the enums skill and place the enum in app/Enums, then cast the enum in your model.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 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: enums Download link: https://github.com/codebar-ag/coding-guidelines/archive/main.zip#enums Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.