Configuration reference
The methods called on MVC::Keayl::Admin to set the admin up, in one place. Each
links to the page covering it in detail. The per-resource declarations used
inside a register block are tabulated in Registering resources.
Mounting and configuration
| Method |
Purpose |
endpoint() |
Returns the engine dispatcher for the host to mount. See Mounting. |
config() |
Returns the shared configuration object. |
configure(:mount-path, :site-title, :logout-path) |
Sets the mount path, site title, and navbar logout link path. See Mounting. |
registry() |
Returns the resource registry (by-model, by-slug, all). |
Resources and pages
| Method |
Purpose |
register(Model, { ... }, :slug, :singular, :plural, :per-page, :scope-counts) |
Registers a resource. See Registering resources. |
page(slug, &block, :title, :group, :label, :priority, :icon, :hide) |
Registers a standalone page. See Customization. |
path-for(name, *args) |
Builds the mount-prefixed URL for a resource action. See Registering resources. |
Navigation and dashboard
| Method |
Purpose |
menu-link(:label, :url, :group, :priority, :icon, :external) |
Adds a custom menu link. See Navigation. |
menu-group-order(*groups) |
Orders the menu groups explicitly. See Navigation. |
dashboard-block(&block, :title) |
Adds a custom dashboard panel. See Navigation. |
Authentication and authorization
| Method |
Purpose |
authenticate-with($strategy) |
Installs an authentication strategy. See Authentication. |
authorize-with($policy) |
Installs an authorization policy. See Authorization. |
Assets, theming, and localization
| Method |
Purpose |
use-stylesheet($url) |
Layers a host stylesheet after the bundle. See Assets. |
view-path($dir) |
Adds a host view path searched before the engine's. See Customization. |
load-locales($dir) |
Loads locale files into the I18n backend. See Customization. |
locale($code) |
Selects the active locale. See Customization. |
Generators
The keayl-admin command scaffolds the admin from the shell, not from Raku:
| Command |
Purpose |
keayl-admin generate admin:install |
Mounts the engine and writes the initializer, dashboard, and auth stubs. |
keayl-admin generate admin <Model> |
Emits an explicit registration introspected from the model's schema. |
See Installation.