- make:admin-controller edits the singular of its name (--model overrides):
ModelName, modelClass and the YAML under models/<model>/
- NewRecord returns &models.<Model>{} when the model exists; otherwise the
nil body stays and the command says to run make:model
- config_list.yaml offers create and delete with showCheckboxes
- registry.gen.go embeds controllers/*/*.yaml and models/*/*.yaml once they
exist and exposes generatedAdminFS(); scaffolded plugins implement
pact.AdminAssets through it, and a plugin without AdminFS gets a note
- blog example moves its YAML to models/post; docs and help text follow
14 lines
339 B
YAML
14 lines
339 B
YAML
list: ~/plugins/acme/blog/models/post/columns.yaml
|
|
modelClass: Post
|
|
title: acme.blog::lang.posts.title
|
|
recordUrl: acme/blog/posts/update/:id
|
|
recordsPerPage: 20
|
|
showCheckboxes: true
|
|
defaultSort:
|
|
column: published_at
|
|
direction: desc
|
|
toolbar:
|
|
buttons: [create, delete]
|
|
search:
|
|
prompt: backend::lang.list.search_prompt
|