What problem does it solve?
This skill resolves the complexity of managing October CMS-specific Eloquent model patterns, ensuring developers correctly implement array-based relationships, validation traits, and lifecycle events without falling back to standard Laravel conventions.
Core Features & Use Cases
- Model Scaffolding: Provides guidance on using artisan commands to generate models, migrations, and configuration files.
- Relationship Management: Simplifies the implementation of complex array-based relationships, including deferred bindings and file attachments.
- Lifecycle Hooks: Assists in correctly overriding model events and implementing traits like Sluggable, Sortable, or NestedTree.
- Use Case: When building a custom plugin, use this skill to define a complex relationship between a Post model and its associated Tags and Files, ensuring the validation rules and deferred bindings are configured for the October CMS backend.
Quick Start
Activate the octobercms-model-development skill and ask it to generate a model class with validation rules and a belongsToMany relationship for your plugin.