Adminix Documentation Help

Dashboard

DashboardModule lays out existing Adminix modules in named sections, rows, and responsive columns. It is layout-only: business routes, jobs, validation, persistence, and downloads still belong to the consuming Laravel app.

Use it when a page needs an operational dashboard made from counters, lists, text, links, progress bars, media, or other Adminix modules.

use AlexKudrya\Adminix\AdminixPage; use AlexKudrya\Adminix\Modules\List\ListField; use AlexKudrya\Adminix\Modules\List\ListModule; use AlexKudrya\Adminix\Modules\Module; $dashboard = Module::dashboard() ->name('ops-dashboard') ->title('Operations dashboard') ->description('Live tenant-scoped operations view.') ->icon('bi bi-grid'); $summary = $dashboard ->section('overview', 'Overview') ->description('Named section with responsive columns.') ->icon('bi bi-speedometer2') ->row('summary'); $summary ->column('tenant-kpi', 4) ->title('Tenant records') ->description('Counter resolved through page params.') ->addModule( Module::counter() ->name('tenant-record-count') ->title('Visible records') ->dataSource('records') ->criteria([ ['tenant_id', '=', 'param:0'], ]) ); $summary ->column('operator-copy', 4) ->title('Operator note') ->addModules( Module::text() ->name('dashboard-copy') ->body('Nested modules keep page params.'), Module::adminixLink() ->name('dashboard-media-link') ->title('Open media') ->icon('bi bi-images') ->uri('media') ->params([9]) ); $summary ->column('tenant-table', 4) ->title('Tenant rows') ->addModule( ListModule::name('tenant-records') ->dataSource('records') ->primaryKey('id') ->criteria([ ['tenant_id', '=', 'param:0'], ]) ->addFields( ListField::name('Name')->field('name'), ListField::name('Status')->field('status') ) ); AdminixPage::uri('dashboard') ->name('dashboard-page') ->addModule($dashboard);

Rendered example:

Adminix dashboard module

Layout API

  • Module::dashboard() returns a blank dashboard module.

  • DashboardModule::make($name, $title = null) creates a named dashboard directly.

  • name() is required and must be unique on the page.

  • title(), description(), and icon() render the dashboard header.

  • section($name, $title = null) creates and appends a DashboardSection.

  • DashboardSection::row($name = null) creates and appends a row.

  • DashboardRow::column($name, $span = 12) creates and appends a column.

  • Column spans are clamped to 1..12 and map to the Adminix responsive grid.

  • addModule() and addModules() accept any AdminixModuleInterface module inside a column.

  • Dashboards are full-width by default; halfWidth() restores a half-width top-level layout.

Rows and columns are structural. They do not define data sources, writable fields, actions, or routes. Nested modules are resolved through their normal data providers, so route params, criteria, filters, list endpoint lookup, and module-name discovery continue to work.

Doctor And Safety

adminix:doctor walks the complete page module tree, including dashboard sections, rows, columns, and panel children. It reports invalid structure and still checks nested lists, resources, imports, media browsers, tenant switchers, links, and progress bars. Module-name uniqueness and ImportModule progress references are resolved page-wide at every nesting level. An ancestor cycle produces a controlled ADMINIX_MODULE_ANCESTOR_CYCLE error instead of recursive inspection.

Keep tenant/user scoping inside server-side module criteria or a server-owned tenant context provider. Do not accept dashboard section names, data sources, primary keys, writable fields, action names, or param:* values from browser input.

Scope

DashboardModule is not a database-stored admin builder and does not replace PHP-first page configuration. Use it to compose existing runtime-generated modules into a richer page layout. For a single framed block, use PanelModule; for static copy, use TextModule.

Last modified: 23 July 2026