Page
Page configuration is provided by a class that implements AlexKudrya\Adminix\AdminixPageProvider.
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:
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 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.
Route parameters
Adminix page URIs are matched through the package catch-all page route. The page URI itself is not a module parameter.
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.
You can also pass the page name directly, for example products.
Result: a new Adminix page provider will be created at app/Adminix/Pages/ProductsPage.php.
After that, add this class to the pages array in config/adminix.php.
If needed, add a sidebar menu link to this page.
Adminix page configuration
Method | Description |
|---|---|
setAsHomePage | Defines the home page for the Adminix panel. Must be used only for one Adminix page, usually the |
uri | Defines the URL address of the Adminix page. Required. Must be unique. Structure: Example: if the page URI is set to Recommended: define a |
name | Defines the system name for the page. Required. Must be unique. |
addModule / addModules | Adds module(s) to the page. Every top-level module is an instance of Modules are rendered in the same order in which they are added to the Module configuration is described in Modules. |