eloquent-casting

Installation
SKILL.md

Eloquent Attribute Casting

When to use

  • The user wants an Eloquent attribute returned as a real PHP type — boolean, Carbon date, array, or object — instead of a raw string from the database.
  • The user needs reusable, non-trivial attribute conversion — a value object, money type, or encrypted field — and reaches for a custom CastsAttributes class.
  • The user stores a status or type column and wants Eloquent to return it as a backed PHP enum via an enum cast.

When NOT to use

Installs
1
GitHub Stars
3
First Seen
Jul 3, 2026
eloquent-casting — anyorgname/php-skills