phlo/cms

Phlo CMS — content management system for the Phlo framework

Maintainers

Package info

github.com/q-ainl/phlo-cms

Homepage

pkg:composer/phlo/cms

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.9.0 2026-02-20 02:50 UTC

This package is auto-updated.

Last update: 2026-03-20 04:01:47 UTC


README

Content management system for the Phlo framework. Auto-generates a full admin interface from your model schemas — listings, forms, relations, search, API and dashboard.

Install

composer require phlo/cms

Requires phlo/tech.

Setup

Add the CMS paths to your data/build.json:

{
    "paths": {
        "app": [
            "",
            "/path/to/cms/",
            "/path/to/cms/widgets/"
        ]
    }
}

The CMS reads %app->models to discover your types and auto-generates routes for each model.

What you get

Listings

Every model gets a paginated list view with:

  • Search across searchable fields
  • Sortable columns
  • Configurable filters
  • Pagination

Customize via static properties on your model:

static titleList = 'Cats'
static icon = 'cat'
static pp = 25
static objFilters = ['breed', 'color']
static objSorts = ['name', 'dob']

Record views

Detail pages with parent/child/many relations rendered automatically from the schema. Child records are shown as nested listings, many-to-many as linked tags.

Forms

Create and edit forms generated from field definitions. Each field type renders its own input: text inputs, selects, date pickers, file uploads, WYSIWYG editors, image uploaders, relation selectors.

API

RESTful endpoints for every model:

Method Route Action
POST /api/{model} Create
PUT /api/{model}/{id} Update
PATCH /api/{model}/{id} Partial update
DELETE /api/{model}/{id} Delete

All operations validate required fields and parse through field-level sanitization.

Dashboard

Overview page with model counts and optional widgets. Add BI widgets to your models for charts and analytics:

static objWidgets => [
    'Registrations per month' => arr(
        type: 'bar',
        data: static::records(columns: 'MONTH(created) AS label, COUNT(*) AS value', group: 'label'),
    ),
]

Widget types: bar, line, pie, gauge, list.

Themes and transitions

Built-in theme switcher with 100+ color themes and 18 page transition effects.

Architecture

The CMS is a pure UI layer on top of Phlo's ORM. It has no side effects on the framework — models work identically with or without the CMS. All CRUD, validation and relation logic lives in the framework.

CMS.phlo              # Base class, routing, model discovery
CMS.list.phlo         # List views
CMS.record.phlo       # Record detail views
CMS.create.phlo       # Create forms
CMS.change.phlo       # Edit forms
CMS.API.phlo          # REST API
CMS.dashboard.phlo    # Dashboard
CMS.dashboard.bi.phlo # AI-powered BI queries
CMS.settings.phlo     # Theme/transition settings
CMS.layout.phlo       # Navigation layout
CMS.style.phlo        # Styling
CMS.script.phlo       # Client-side JS
widgets/              # ECharts visualization widgets

License

Apache-2.0