0056-laravel-models

Community

Build clean, type-safe Eloquent models.

AuthorMrJmpl3
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents messy, hard-to-maintain Eloquent models by guiding you to keep domain logic out of models while still making them type-safe, expressive, and consistent.

Core Features & Use Cases

  • Type-safe casting and DTO mapping: Define casts for enums, booleans, datetimes, JSON arrays, and DTO-backed attributes to keep model data reliable.
  • Clean model responsibilities: Place business logic in Actions and keep models focused on relationships, casts, and simple helpers.
  • Lifecycle and structure best practices: Use model observers for lifecycle hooks, prefer Laravel PHP attributes for configuration, and avoid $fillable/$guarded by relying on validated inputs upstream.

Quick Start

Use this skill when you create a new Laravel model or refactor an existing one to add relationships, casts, and observer hooks without embedding business workflows into the model class.

Dependency Matrix

Required Modules

None required

Components

references

💻 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: 0056-laravel-models
Download link: https://github.com/MrJmpl3/codex_____data_____configuration/archive/main.zip#0056-laravel-models

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.