octobercms-model-development

Define October CMS Eloquent models with array-based relationships and traits.

9|4|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/octobercms/boost --skill octobercms-model-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: octobercms-model-development
Source: https://github.com/octobercms/boost/tree/main/resources/boost/skills/model-development
Command: npx skills add https://github.com/octobercms/boost --skill octobercms-model-development

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about octobercms-model-development

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

FAQPage Schema
How do I define October CMS Eloquent models with array-based relationships instead of standard Laravel fluent methods?

To define October CMS Eloquent models, you must use array-based relationship syntax and specialized database traits rather than standard Laravel fluent methods. This enforces idiomatic October CMS code architecture for plugin data structures.

How do I add validation rules and file attachments to an October CMS plugin model?

You can add validation rules and file attachments to an October CMS plugin model by utilizing specialized database traits. This skill provides guidance for configuring these traits correctly within your model class.

What is the best way to manage deferred bindings and complex relationships in October CMS?

The best way to manage deferred bindings and complex relationships in October CMS is by implementing the framework's array-based relationship syntax. This approach simplifies configuration for backend data structures involving multiple associated models.

Can I use standard Laravel Eloquent lifecycle events and traits like Sluggable or Sortable in October CMS?

October CMS supports overriding model lifecycle events and implementing specialized traits like Sluggable, Sortable, or NestedTree. This skill assists in correctly applying these traits to manage model events according to platform conventions.

How do I scaffold October CMS models, migrations, and configuration files for a custom plugin?

You can scaffold October CMS models, migrations, and configuration files by using artisan commands. This skill provides guidance on generating these foundational plugin components to kickstart your data architecture development.