@tower_74/cms-plugin-events
v0.1.1
Published
Front-end of the Base CMS events plugin (ADR-0026). Ships source; exports a CmsPlugin with public calendar + list pages.
Downloads
329
Readme
tower_74/cms-plugin-events
Events plugin for the Base CMS (ADR-0026). Adds an
event post type and two public views — a month calendar and a paginated list — with
the event's date stored as post meta via custom fields (ADR-0006).
A plugin is one repo shipping two packages: a private Composer VCS package
(tower_74/cms-plugin-events, the PHP backend) and an npm source package
(@tower_74/cms-plugin-events, the Vue front end).
What it adds
eventpost type with two datetime custom fields —event_start(required) andevent_end— rendered by the core content editor (cms-core ≥ 0.5, cms-ui ≥ 0.15).GET /events— a month calendar (cms-uiEventCalendar), navigable by?month=YYYY-MM.GET /events/list— upcoming events, soonest first (cms-uiEventList): square featured image, title, date, excerpt, and a “Read more” link.- A single event resolves through cms-core's public catch-all at
/event/{slug}.
Everything is gated per request behind PluginRegistry::isEnabled('events'): the events
middleware 404s the public views while disabled, and the post type / admin nav drop out.
Disabling never touches data.
Install
composer require tower_74/cms-plugin-events
npm install @tower_74/cms-plugin-eventsRegister the front end in the host's resources/js/cms.plugins.ts:
import { eventsPlugin } from '@tower_74/cms-plugin-events';
registerCmsPlugins([eventsPlugin]);Add it to Vite noExternal / optimizeDeps, run php artisan migrate (cms-core's post-type
fields column), then enable from the Plugins dashboard (/admin/plugins) or php artisan
events:enable.
Commands
php artisan events:enable/events:disable— toggle the plugin (disabling keeps data).php artisan events:uninstall— destructive: deletes everyeventpost, its meta, revisions, and term relationships, and theeventpost type row. Run it after disabling and beforecomposer remove tower_74/cms-plugin-events.
Develop
make help # list targets
make lint # Pint
make test # Pest + Orchestra Testbench (boots cms-core in isolation)
make release V=0.2.0