Scaffold a plugin with a backend list and form

Use it to start a new plugin that manages records in the backend, with the model, migration, list, form and permission set up for you.

  • Tested with Opus 5.5
  • October CMS 4.x
  • Plugins & Extending
  • By the October CMS team
  • Added on Nov 8, 2026
Prompt
You are helping me build a plugin for October CMS 4, which runs on Laravel. Plugin: [Author.Plugin, eg: Acme.Library] Model: [Model, eg: Book] Fields: [fields, eg: title (string), slug (string, unique), published_at (datetime, nullable)] Create this plugin to manage the model's records in the backend, with a controller named after the model in the plural, eg: Books. 1. Scaffold it with the create:plugin, create:model and create:controller artisan commands, and show me each one. 2. Give the model the fields above. Write the migration in the plugin's updates folder and register it in updates/version.yaml. 3. Validate the fields with the Validation trait, and generate the slug from the title with the Sluggable trait. 4. Set up the controller's list (columns.yaml) and form (fields.yaml) for those fields, with search on the title. 5. Add a backend menu item and a permission in Plugin.php, and require that permission in the controller. Follow October CMS conventions: YAML for lists and forms, and no custom routes. Finish with anything I need to run, such as php artisan october:migrate.
How to use

Fill in the plugin, model and fields at the top, eg: Acme.Library and Book, then paste it into your AI assistant.

Check these in the result:

  • The model's $table matches the table the migration creates, eg: acme_library_books.
  • fields.yaml and columns.yaml are in models/book, and the controller's config_form.yaml and config_list.yaml point to them.
  • The permission code in Plugin.php is the one in the controller's $requiredPermissions.

Good follow-up prompts:

  • "Add a relation from the model to the backend user who created each record."
  • "Add a front-end component that lists the published records with pagination."
Example result
php artisan create:plugin Acme.Library
php artisan create:model Acme.Library Book
php artisan create:controller Acme.Library Books

models/book/fields.yaml

fields:
    title:
        label: Title
        span: left
    slug:
        label: Slug
        span: right
        preset:
            field: title
            type: slug
    published_at:
        label: Published
        type: datepicker

Was this prompt helpful?

Still need help?
October Forum

Community members share experiences, ask questions and exchange tips.

Discord

Talk with other October CMS developers in real time.

Custom Development

Hire the October CMS team to work on your website.

Contact Us

For bug reports and help with this website. See the roadmap or submit an idea on the Portal.