marko/admin

Admin contracts for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-admin

pkg:composer/marko/admin

Statistics

Installs: 0

Dependents: 3

Suggesters: 1

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:27 UTC


README

Admin contracts and section registry -- defines the structure for admin sections, menu items, and dashboard widgets so any module can contribute to the admin panel.

Installation

composer require marko/admin

Quick Example

use Marko\Admin\Attributes\AdminSection;
use Marko\Admin\Contracts\AdminSectionInterface;
use Marko\Admin\MenuItem;

#[AdminSection(id: 'catalog', label: 'Catalog', icon: 'box', sortOrder: 20)]
class CatalogSection implements AdminSectionInterface
{
    public function getId(): string { return 'catalog'; }
    public function getLabel(): string { return 'Catalog'; }
    public function getIcon(): string { return 'box'; }
    public function getSortOrder(): int { return 20; }

    public function getMenuItems(): array
    {
        return [
            new MenuItem(id: 'products', label: 'Products', url: '/admin/catalog/products'),
        ];
    }
}

Documentation

Full usage, API reference, and examples: marko/admin