Download the PHP package pubvana/pages without Composer
On this page you can find all versions of the php package pubvana/pages. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pubvana/pages
More information about pubvana/pages
Files in pubvana/pages
Informations about the package pages
Pubvana Pages
I noticed folks downloading some of these packages. I'm super grateful, Thank You! I would like to let folks know until this notice disappears I'm doing a lot of breaking changes without worrying about them. Once versions are up around 0.5.x things should settle down.
Static pages module for Pubvana - CRUD for standalone pages with slug-based routing, version history, and view tracking. Built as a Flight School plugin.
Features
- Create, edit, and soft-delete pages with slug-based URLs
- Version history with configurable max revisions and one-click restore
- Page view tracking with referrer domain
- HTML sanitization via HTMLPurifier on save (bypass per-save via admin checkbox)
- System page protection (cannot be deleted)
- Page service on
$app->pages()- usable from any controller or plugin - Registers an
adextmenu contribution when admin is present
Requirements
- PHP 8.1+
enlivenapp/flight-schoolenlivenapp/flight-shieldenlivenapp/migrationsflightphp/active-recordezyang/htmlpurifier
Recommends
pubvana/admin(Admin UI for page management)
Installation
Enable in app/config/config.php:
Migrations package creates the pages, page_versions, and page_views tables automatically on first load.
Flight School config
This package uses Flight School's return-array config format. src/Config/Config.php returns the package defaults as an array, Flight School stores that array under pubvana.pages on $app, and the current public route prefix is defined there with 'routePrepend' => 'pages'.
Configuration
Defaults from Config.php - override in your plugin config block:
| Key | Default | Description |
|---|---|---|
max_revisions |
15 |
Maximum version snapshots kept per page |
HTML sanitization config is project-wide under the html_purifier key in config.php. See PLUGIN-ARCHITECTURE.md for details.
Usage
Admin Routes
| Method | Route | Description |
|---|---|---|
| GET | /admin/pages |
Page list |
| GET | /admin/pages/create |
Create form |
| POST | /admin/pages/store |
Store new page |
| GET | /admin/pages/@id/edit |
Edit form |
| POST | /admin/pages/@id/update |
Update page |
| POST | /admin/pages/@id/delete |
Delete page |
| GET | /admin/pages/@id/versions |
Version history |
| POST | /admin/pages/@id/restore/@versionId |
Restore version |
All admin routes require session auth. Mutation routes (store, update, delete, restore) require CSRF.
Seeds
Installs on first run:
- Two permissions:
pages.manage,pages.system - A default "Welcome to Pubvana CMS" page
License
MIT
All versions of pages with dependencies
enlivenapp/flight-school Version ^0.3
enlivenapp/flight-shield Version ^0.2
enlivenapp/migrations Version ^0.2
ezyang/htmlpurifier Version ^4.19
flightphp/active-record Version ^0.7