Igniter task that generates admin page with automatic route registration.
Usage
mix phoenix_kit.gen.admin.page "Reports Dashboard"Arguments
title- The display title for the page (e.g., "Reports Dashboard")
Options
--url- The URL path for the page (optional, derived from title if not provided)--category- The category name (optional, defaults to "General")--icon- Heroicon name for the tab (optional, defaults to "hero-document-text")--permission- Permission key for parent tab (optional, defaults to "dashboard")--category-icon- Heroicon name for the category (optional, defaults to "hero-folder")
Parent/Child Tab Behavior
- First page in a category creates both parent and child tabs
- Subsequent pages in the same category only add the child tab
- Parent tab path points to the first child's URL
- Routes are automatically generated via the
live_viewfield
Examples
# Simple - uses all defaults
mix phoenix_kit.gen.admin.page "Reports Dashboard"
# With custom category
mix phoenix_kit.gen.admin.page "User Management" --category="Users"
# With custom icon
mix phoenix_kit.gen.admin.page "Analytics" --icon="hero-chart-bar"
# Full control
mix phoenix_kit.gen.admin.page "Reports" --url="/admin/analytics/reports" --category="Analytics" --icon="hero-chart-bar"Where the rest of the story is
This task scaffolds one page. Everything around it — tabs, groups, subtabs,
badges, permissions, dynamic children, context selectors — is documented in
lib/phoenix_kit/dashboard/README.md, published as Built-in Dashboard on
https://phoenix-kit.hexdocs.pm.
Pointing at it here because at least one host went looking in the source: the guide exists and is thorough, and the only thing wrong with it was that nothing linked to it from the two places people actually start.