enums

Automate PHP enum management in Laravel projects with ArchTech\Enums traits.

1|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/aronpc/ai --skill enums-aronpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enums
Source: https://github.com/aronpc/ai/tree/main/skills/enums
Command: npx skills add https://github.com/aronpc/ai --skill enums-aronpc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

PHP enums in Laravel projects can become boilerplate-heavy and hard to maintain; this Skill provides a trait-enabled pattern and tooling for clean, scalable enum usage with ArchTech\Enums.

Core Features & Use Cases

  • 7 Traits available: InvokableCases, Names, Values, Options, From, Metadata, Comparable to empower enums with helpers, mappings, and metadata.
  • Laravel integration: casts in Eloquent, validation rules, and metadata-driven behavior to simplify domain modeling.
  • Use Case: Define domain enums in App\Enums and reuse across models, requests, factories, and UI components.

Quick Start

Create a new enum under App\Enums, apply the trait set, and reference it in models, requests, and factories to leverage typed values and metadata.

Frequently Asked Questions about enums

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce PHP enum boilerplate in Laravel projects?

To reduce PHP enum boilerplate in Laravel, apply trait-based helpers like InvokableCases, Names, and Values to automate enum management and eliminate repetitive code across models and requests.

What is the best way to attach metadata to PHP enums in Laravel?

The best way to attach metadata to PHP enums is using the Metadata trait from ArchTech\Enums, which allows you to define and retrieve custom metadata directly on enum cases for domain modeling.

Can I generate enum options dynamically for Laravel factories and UI components?

Yes, you can generate enum options dynamically for Laravel factories and UI components using the Options trait, which provides an options() helper to retrieve all enum cases as key-value pairs.

Does this enum approach work without any additional Laravel dependencies?

Yes, this enum approach works without additional dependencies, implementing the ArchTech\Enums trait set directly within your App\Enums directory using only scripts and references components.

Why do my PHP enums lack comparison and conversion helpers in Laravel?

PHP enums lack comparison and conversion helpers when missing the Comparable and From traits, which provide methods like fromName() and equality checks for seamless enum usage in Laravel.