Changelog
Release notes your admins write, with a category and a publish date, sanitised on save and published at /changelog, grouped by month with a category filter.


What it adds
| File | Purpose |
|---|---|
app/Models/ChangelogEntry.php | ulid, title, HTML body, category, published_at, is_published; published() scope, categories() |
database/factories/ChangelogEntryFactory.php | Factory with a draft() state |
database/migrations/*_create_changelog_entries_table.php | |
app/Livewire/Changelog/PublicChangelog.php and its view | The public page, in the user shell |
app/Livewire/Admin/Changelog/ChangelogList.php, ChangelogForm.php and views | List, create and edit |
Install
php artisan ui-kit:install-module changelog
Composer: mews/purifier:^3.4, which sanitises the HTML body on save.
What the installer changes
- Publishes the purifier config.
- Adds
/changelogbetween the public-routes markers inroutes/ui-kit-user.php, the group open to guests, three routes between the markers inroutes/admin.php, and aChangelognav entry inconfig/admin.php. - Runs the migration.
Routes
| Route | Name |
|---|---|
GET /changelog | changelog.public |
GET /admin/changelog | admin.changelog.index |
GET /admin/changelog/create | admin.changelog.create |
GET /admin/changelog/{ulid}/edit | admin.changelog.edit |
The public page
/changelog lists the published entries, newest first, under a heading per month. published() filters on is_published and a published_at of today or earlier, so a scheduled entry appears on its date and a draft never does. Each entry shows its category badge (colours from ChangelogEntry::categoryTone()), its date, its title and its body.
The category filter above the list is a row of links, ds::tabs in navigation mode, each with its count: All, then every category with at least one published entry. Each link is its own URL (/changelog?category=fix), so a filtered view can be shared or bookmarked, and the current one is marked with aria-current. The counts come from one grouped query. An unknown category in the URL shows everything. With nothing published, the page says so.
The body is printed as HTML. That is safe because the admin form runs it through mews/purifier on save, keeping only p, br, strong, b, em, i, u, ul, ol, li, a[href], h3 and h4; an entry written some other way (a seeder, an import) has to be purified the same way. The categories, and their labels, are ChangelogEntry::categories().
The shell's header shows a Changelog link on every user-facing page while the route exists.
The admin screens


The list opens with a New Entry button in the page header, then a title search and a category filter over a table: title, a category badge, a Published or Draft badge, the date, and Edit and Delete per row.


The form has title, category, an HTML body (the allowed tags are listed under it), a publish date and a Published switch. The switch is bound to the form like every other field: nothing is published until you press Create Entry or Save.
Removing
Delete the model, factory, Livewire components and views, remove the route lines from routes/ui-kit-user.php and routes/admin.php and the nav entry between their markers, drop changelog_entries, remove changelog from installed_modules, and composer remove mews/purifier if nothing else uses it.