Adminix Documentation Help

Page

Page configuration is provided by a class that implements AlexKudrya\Adminix\AdminixPageProvider.

// app/Adminix/Pages/IndexPage.php namespace App\Adminix\Pages; use AlexKudrya\Adminix\AdminixPage; use AlexKudrya\Adminix\AdminixPageProvider; class IndexPage implements AdminixPageProvider { const URI = '/'; public static function get(): AdminixPage { $page = new AdminixPage(); $page->setAsHomePage(); $page->uri(self::URI); $page->name('index'); $page->addModules( // ... ); return $page; } }

Every page provider class must implement the get() method and return an AlexKudrya\Adminix\AdminixPage instance.

Responsive admin shell

Adminix renders every page inside the shared package shell. The PHP page configuration does not need a mobile-specific option:

$page = new AdminixPage(); $page->uri('products'); $page->name('products'); $page->addModules( // ListModule, ResourceModule, charts, counters, links, modals, ... );

Result: desktop keeps the normal sidebar layout. On narrow screens Adminix shows a menu icon button, keeps the sidebar off-canvas until it is opened, closes it by backdrop or Escape, and gives page content enough top spacing so modules do not sit under the menu button. The 44px trigger uses a compact rounded-square shape, so it remains easy to tap without looking like a circular floating action.

Rendered mobile example:

Adminix mobile shell with the off-canvas sidebar open

The shell is package-owned behavior. Do not create a second app-specific mobile navigation layer around Adminix pages; extend the Adminix shell and module views instead.

Use page metadata when the whole page needs a title, short description, breadcrumb trail, or primary actions above the modules. The header is declared in the page provider and rendered by the shared Adminix shell.

use AlexKudrya\Adminix\AdminixPage; use AlexKudrya\Adminix\Modules\Module; use AlexKudrya\Adminix\Navigation\PageBreadcrumb; $page = AdminixPage::uri('orders') ->name('orders-page') ->title('Orders') ->description('Review tenant-scoped orders and open the create flow.') ->icon('bi bi-receipt') ->addBreadcrumb( PageBreadcrumb::make('Dashboard', 'dashboard') ->icon('bi bi-grid') ) ->addBreadcrumb( PageBreadcrumb::make('Orders') ->icon('bi bi-receipt') ->current() ) ->addHeaderAction( Module::adminixLink() ->name('orders-create') ->title('New order') ->icon('bi bi-plus-lg') ->uri('orders/create') ) ->addModule( // ListModule, DashboardModule, PanelModule, ... );

Result: Adminix renders a compact page header before the module grid. The breadcrumb link opens /adminix/dashboard, the current breadcrumb is announced with aria-current="page", and the header action uses the same LinkModule/AdminixLinkModule rendering contract as other Adminix links.

Rendered example:

Adminix page header with breadcrumbs and action

Header actions can use page params:

->addHeaderAction( Module::adminixLink() ->name('tenant-media') ->title('Open media') ->icon('bi bi-images') ->uri('media') ->params(['param:0']) )

For /adminix/orders/9, the action points to /adminix/media/9. Do not build the same link in JavaScript; keep route params and action URLs server-owned.

Route parameters

Adminix page URIs are matched through the package catch-all page route. The page URI itself is not a module parameter.

ResourceModule::name('user') ->dataSource(User::class) ->addProp(ResourceProperty::key('id')->value('param:0'));

Result: /adminix/user/123 resolves param:0 to 123. For new pages, use zero-based param:n indexes for page and modal context.

Existing applications that were configured with the legacy one-based style, for example param:1 for /adminix/user/123, remain supported so old Adminix links such as /adminix/bot/31 keep opening their resource pages. Do not mix param:0 and legacy param:1 indexing inside one page provider; migrate a page to zero-based indexes as one focused change when touching that page.

Create new Adminix page

To create a new page, use the next Artisan command. If you do not pass a name, Laravel will prompt you for it.

php artisan make:adminix_page

You can also pass the page name directly, for example products.

php artisan make:adminix_page products

Result: a new Adminix page provider will be created at app/Adminix/Pages/ProductsPage.php.

// app/Adminix/Pages/ProductsPage.php namespace App\Adminix\Pages; use AlexKudrya\Adminix\AdminixPage; use AlexKudrya\Adminix\AdminixPageProvider; class ProductsPage implements AdminixPageProvider { const URI = 'products'; public static function get(): AdminixPage { $page = new AdminixPage(); $page->uri(self::URI); $page->name('products'); $page->addModules( // ToDo: add required modules ... ); return $page; } }

After that, add this class to the pages array in config/adminix.php.

// config/adminix.php use App\Adminix\Pages\IndexPage; use App\Adminix\Pages\ProductsPage; use App\Adminix\Pages\UsersPage; // ... 'pages' => [ IndexPage::get(), UsersPage::get(), ProductsPage::get(), ],

If needed, add a sidebar menu link to this page.

// config/adminix.php use AlexKudrya\Adminix\Modules\Link\MenuLinkModule; use App\Adminix\Pages\IndexPage; use App\Adminix\Pages\ProductsPage; use App\Adminix\Pages\UsersPage; // ... 'menu' => [ 'title' => 'Admin panel', 'links' => [ MenuLinkModule::title('Dashboard') ->uri(IndexPage::URI) ->icon('bi bi-speedometer2'), MenuLinkModule::title('Users') ->uri(UsersPage::URI) ->icon('bi bi-people-fill'), MenuLinkModule::title('Products') ->uri(ProductsPage::URI) ->icon('bi bi-boxes'), ], ],

Adminix page configuration

Method

Description

setAsHomePage

Defines the home page for the Adminix panel.

Must be used only for one Adminix page, usually the index page.

uri

Defines the URL address of the Adminix page.

Required.

Must be unique.

Structure: [Base URL] / [Prefix from config] / [Page URI].

Example: if the page URI is set to products, the full page URL will be https://mydomain.com/adminix/products.

Recommended: define a URI constant and reuse it in page and menu configuration.

name

Defines the system name for the page.

Required.

Must be unique.

title / description / icon

Adds optional page-level header metadata.

Use these when the page itself needs a clear heading above its modules. Module headings still belong inside their own module configuration.

addBreadcrumb / addBreadcrumbs / breadcrumbs

Adds page-level breadcrumb items.

Use PageBreadcrumb::make($title, $uri) for links and ->current() for the current page item. Breadcrumb params support the same param:n page parameter style as page actions.

addHeaderAction / addHeaderActions / headerActions

Adds compact page-level actions rendered in the shared page header.

Use Module::adminixLink() or AdminixLinkModule for Adminix page links and LinkModule for named Laravel routes. Action params are resolved server-side; do not trust browser-submitted route context.

addModule / addModules

Adds module(s) to the page.

Every top-level module is an instance of AdminixTopModuleInterface with its own configuration.

Modules are rendered in the same order in which they are added to the AdminixPage object.

Module configuration is described in Modules.

Last modified: 23 July 2026