Backend Models
Installation
SKILL.md
Backend Models
When to use this skill
- When creating new Eloquent models for database tables
- When defining model relationships (hasMany, belongsTo, belongsToMany, hasOne, etc.)
- When adding fillable or guarded properties to control mass assignment
- When implementing model casts for attributes (dates, JSON, enums, etc.)
- When defining database constraints (NOT NULL, UNIQUE, foreign keys)
- When working with model factories for testing or seeding
- When working on files in app/Models/ directory
- When creating model classes or updating existing models
- When implementing model accessors and mutators
- When defining custom model methods or scopes
- When choosing appropriate data types for model properties
- When implementing model validation logic
This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle backend models.