PHPackages                             pubvana/pages - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. pubvana/pages

ActiveFlightphp-plugin[Utility &amp; Helpers](/categories/utility)

pubvana/pages
=============

Static pages module for Pubvana CMS

0.2.3(2mo ago)041MITPHPPHP ^8.1

Since Apr 26Pushed 2mo agoCompare

[ Source](https://github.com/Pubvana-CMS/pages)[ Packagist](https://packagist.org/packages/pubvana/pages)[ RSS](/packages/pubvana-pages/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (4)Dependencies (5)Versions (7)Used By (1)

[![Stable? Not Quite Yet](https://camo.githubusercontent.com/8712c441bb32fd8db507e0008c5d13e30def50064f8fcbc689fbcf5191f7d2af/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461626c652533462d6e6f7425323071756974652532307965742d626c75653f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/pages)[![License](https://camo.githubusercontent.com/e272c8317a9b52a29cbb167314757b10dac5b1ef9340a649b8b13de95b9ec83d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f70756276616e612f70616765733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/pages)[![PHP Version](https://camo.githubusercontent.com/923d3aad5ab37eb113ad0f679163a5abf4709d20b25566f965746a4b8a403931/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f70756276616e612f70616765733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/pages)[![Monthly Downloads](https://camo.githubusercontent.com/f73415a396e770ea57f4924a5234f8ac8febc3711ee5f7738869b67ed2715971/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f70756276616e612f70616765733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/pages)[![Total Downloads](https://camo.githubusercontent.com/8f37f88e529b45e837d60a93c1faba3cebf12b75d77cffef08272e417798732c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70756276616e612f70616765733f7374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/pubvana/pages)[![GitHub Issues](https://camo.githubusercontent.com/b7bef3cb96e11ac97b835f4feecc0f0e019e7528f057eb2c2dd5cb26bb165a46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f50756276616e612d434d532f70616765733f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/pages/issues)[![Contributors](https://camo.githubusercontent.com/cc3db06ecc0e7b0b6194846df31ee78fb15ec91e1a53fdc49418aee59506a91b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f50756276616e612d434d532f70616765733f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/pages/graphs/contributors)[![Latest Release](https://camo.githubusercontent.com/68d6f669e2ff58deb8752019dbcc5c0df9936b3ae9f1095eda372e0b116c84ee/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f50756276616e612d434d532f70616765733f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/pages/releases)[![Contributions Welcome](https://camo.githubusercontent.com/9db3f8b82ea88469efd296a9305fc00f40b4c9450bb6b539d42d339fa6963444/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d626c75653f7374796c653d666f722d7468652d6261646765)](https://github.com/Pubvana-CMS/pages/pulls)

Pubvana 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](https://pubvanacms.com) - CRUD for standalone pages with slug-based routing, version history, and view tracking. Built as a [Flight School](https://github.com/enlivenapp/flight-school) plugin.

Features
--------

[](#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 `adext` menu contribution when admin is present

Requirements
------------

[](#requirements)

- PHP 8.1+
- `enlivenapp/flight-school`
- `enlivenapp/flight-shield`
- `enlivenapp/migrations`
- `flightphp/active-record`
- `ezyang/htmlpurifier`

Recommends
----------

[](#recommends)

- `pubvana/admin` (Admin UI for page management)

Installation
------------

[](#installation)

```
composer require pubvana/pages
```

Enable in `app/config/config.php`:

```
'plugins' => [
    'pubvana/pages' => [
        'enabled'  => true,
        'priority' => 43,
    ],
],
```

Migrations package creates the `pages`, `page_versions`, and `page_views` tables automatically on first load.

Flight School config
--------------------

[](#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
-------------

[](#configuration)

Defaults from `Config.php` - override in your plugin config block:

KeyDefaultDescription`max_revisions``15`Maximum version snapshots kept per pageHTML sanitization config is project-wide under the `html_purifier` key in `config.php`. See [PLUGIN-ARCHITECTURE.md](../../docs/PLUGIN-ARCHITECTURE.md) for details.

Usage
-----

[](#usage)

```
$pages = Flight::pages();

// Create a page
$page = $pages->create([
    'title'            => 'About Us',
    'slug'             => 'about-us',
    'content'          => 'Welcome.',
    'status'           => 'published',
    'meta_title'       => 'About Us',
    'meta_description' => 'Learn more about us.',
], $userId);

// Update a page
$pages->update($id, [
    'title'   => 'About Us - Updated',
    'content' => 'New content.',
    'status'  => 'published',
], $userId);

// Bypass HTML sanitization for a single save
$pages->create([
    'content'        => 'Trusted HTML',
    'purify_content' => false,
    // ...
], $userId);

// Find by ID or slug
$page = $pages->find(5);
$page = $pages->findBySlug('about-us');

// List with pagination
$result = $pages->list(page: 1, perPage: 25);
// $result = ['items' => [...], 'total' => 12, 'page' => 1, 'per_page' => 25]

// Soft-delete (system pages are protected)
$pages->delete($id);

// Version history
$versions = $pages->getVersions($id);
$pages->restoreVersion($pageId, $versionId, $userId);

// Record a page view (referrer domain is optional, typically parsed from HTTP_REFERER)
$referrer = parse_url($_SERVER['HTTP_REFERER'] ?? '', PHP_URL_HOST) ?: null;
$pages->recordView($pageId, $referrer);
$count = $pages->getViewCount($pageId);
```

Admin Routes
------------

[](#admin-routes)

MethodRouteDescriptionGET`/admin/pages`Page listGET`/admin/pages/create`Create formPOST`/admin/pages/store`Store new pageGET`/admin/pages/@id/edit`Edit formPOST`/admin/pages/@id/update`Update pagePOST`/admin/pages/@id/delete`Delete pageGET`/admin/pages/@id/versions`Version historyPOST`/admin/pages/@id/restore/@versionId`Restore versionAll admin routes require session auth. Mutation routes (store, update, delete, restore) require CSRF.

Seeds
-----

[](#seeds)

Installs on first run:

- Two permissions: `pages.manage`, `pages.system`
- A default "Welcome to Pubvana CMS" page

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance85

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

6

Last Release

79d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3036663?v=4)[Mike W](/maintainers/enlivenapp)[@enlivenapp](https://github.com/enlivenapp)

---

Top Contributors

[![enlivenapp](https://avatars.githubusercontent.com/u/3036663?v=4)](https://github.com/enlivenapp "enlivenapp (6 commits)")

### Embed Badge

![Health badge](/badges/pubvana-pages/health.svg)

```
[![Health](https://phpackages.com/badges/pubvana-pages/health.svg)](https://phpackages.com/packages/pubvana-pages)
```

###  Alternatives

[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k46](/packages/civicrm-civicrm-core)[oat-sa/tao-core

TAO core extension

65143.7k124](/packages/oat-sa-tao-core)[verbb/formie

The most user-friendly forms plugin for Craft.

101393.6k74](/packages/verbb-formie)[getdkan/dkan

DKAN Open Data Catalog

387138.7k2](/packages/getdkan-dkan)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
