jonassiewertsen/statamic-how-to-addon
A lightweight Statamic addon by Jonas Siewertsen that demonstrates how to build and register custom addon functionality. It serves as a practical starting point for developers extending Statamic with their own features and control panel additions.
This is a Statamic addon, not a general Laravel package — everything runs inside the Statamic control panel. Treat it as a client-facing documentation surface rather than application logic.
composer require jonassiewertsen/statamic-how-to-addon
Statamic 4 implies Laravel 10 / PHP 8.1+. If you're still on Statamic 3, stay on ^1.4 until you've validated v1.5.0.php artisan vendor:publish and pick the addon's provider, or target the specific tags defined in src/ServiceProvider.php. Read that file first — it tells you the publish tags, view namespace, and any CP nav registration in one place.php artisan cache:clear, php please stache:clear, and php artisan view:clear after install or upgrade. Statamic's Stache and compiled Blade views are the usual cause of "the addon installed but nothing changed".Where to look first, in order: composer.json (version constraints and extra.statamic discovery block), src/ServiceProvider.php, config/, then resources/.
Documentation as versioned content. Author the how-to entries in the repo and deploy them with the code, rather than typing them into a production CP. That makes docs reviewable in PRs and reproducible across local/staging/production. If the addon stores entries as flat files, commit them; if it stores them in the database, export and re-import in your deploy script.
Onboarding surface for clients. The strongest day-to-day use is scoping the how-to area to a curated set of guides for each client site. Pair it with Statamic's permission system so editor roles see the guides while super users see everything.
Theming to match the CP. Publish the views and override the namespace (view('statamic-how-to-addon::...')) so guides inherit your CP branding rather than looking like a bolted-on third-party panel. Keep overrides thin — the more you fork, the more v1.5.x → v1.6.x becomes a merge job.
Multi-site awareness. On multi-site installs, verify whether guide content is site-scoped or global. If it's global, write guides that are site-agnostic (or explicitly label them "applies to the UK site only"); if it's per-site, wire the guide content into each site's onboarding flow.
Deployment. No migrations means this is deployment-cheap: add the composer bump, run the publish step, clear caches, done. Put the publish + cache-clear commands in your deploy script's after: hooks so upgraded view assets never go stale.
Upgrade validation workflow. Branch, bump to ^1.5, load the CP, open the how-to area, confirm nav entry, styling, and any Vue/asset-driven UI renders. Statamic 4 moved addon asset builds to Vite; addons still shipping Laravel Mix assets are the common breakage point.
"jonassiewertsen/statamic-how-to-addon": "^1.4" if you're on Statamic 3 and not ready to move; use ^1.5 only after your smoke test passes. Avoid dev-main on client projects.--force for the addon's asset/view tags, then clear Statamic's cache and compiled views. Symptom: the panel renders but styles or scripts 404.extra.statamic block in composer.json plus the service provider's manifest. If the CP nav item is missing after install, check that block first, then php artisan route:list | grep -i how to confirm routes registered at all.statamic/cms, read the addon's constraint rather than forcing --with-all-dependencies. A constraint that hasn't been widened is a reliable signal of where the author's testing stopped.vendor/. Anything you patch inside vendor/jonassiewertsen/ disappears on the next composer update, and this release is exactly the kind of small, infrequent bump where that happens unnoticed.storage/logs/laravel.log → php please support:details (captures Statamic/PHP versions for a useful bug report) → the addon's GitHub issues. Since the author asked for problem reports on this release, a reproducible issue with support:details output is the fastest route to a fix.How can I help you explore Laravel packages today?