axelferdinand/statamic-secretary
Secretary is a Statamic addon that provides a simple, configurable assistant for your control panel. It helps streamline everyday content-management tasks, integrates with existing Statamic workflows, and is easy to install and customize.
This is a 0.x Statamic 6 addon (Control Panel assets + Postmark integration), not a plain Laravel package — treat its stability guarantees accordingly.
composer require <vendor>/<package>:^0.1.13 — 0.1.13 is the first release whose committed CP assets are rebuilt against the secure Statamic 6.31.0 lock; do not start on 0.1.10 or earlier.statamic/cms ^6.31. Check composer.json require before anything else — the lock refresh in 0.1.12 means older Statamic 6.2x installs will conflict.php artisan vendor:publish --provider="<Vendor>\<Package>\ServiceProvider" (config + public/vendor/<package> CP assets).POSTMARK_TOKEN (and the webhook secret, if the package exposes one) in .env; add them to .env.example and your deploy secrets store in the same PR.Where to look first, in order: composer.json (constraints), src/ServiceProvider.php (transport/mailer registration, CP nav, routes), config/*.php (transport + webhook keys), routes/ (webhook endpoint and middleware), tests/ (the shape the maintainers expect).
First use case: swap the mail transport to Postmark for one low-risk mailable (password reset or a contact form), send it, then point the Postmark webhook at the package route and replay the same delivery twice — you should get one processed event and one rejected replay. That single loop exercises the mail path, the signature check, and the v0.1.11 replay protection all at once.
Transport via config, not code. Register Postmark in config/mail.php ('postmark' => ['transport' => 'postmark']) and let the package's service provider wire the mailer. Resist constructing the API client directly in your own services — you lose the package's error mapping and the upgrade path.
Webhook idempotency is your responsibility to store. The v0.1.11 replay protection keys off the delivery/message identity; make sure the store it checks is shared across all app servers (Redis or database cache), not file/array. In multi-node deployments a per-node cache silently defeats the protection. Pair it with your own processed_webhooks table if you need an audit trail — a cache hit proves "seen", not "handled".
Handle webhooks on the queue. Point the package route at a thin controller/job that returns 200 fast and does the work in ShouldQueue. Postmark retries on timeouts; slow synchronous handlers generate duplicate deliveries that the replay guard then has to absorb.
Asset pipeline parity with the maintainers. 0.1.13 is entirely about reproducible frontend verification. Mirror it: build CP assets in CI (npm ci && npm run build), then git diff --exit-code public/vendor/<package> so a lock bump that changes assets without a rebuild fails the build instead of blanking the Control Panel in production.
Testing patterns.
Mail::fake() for outbound assertions; Http::fake(['api.postmarkapp.com/*' => ...]) when you need to assert payload shape (tag, metadata, stream).Upgrade cadence. Stay inside ^0.1 and bump deliberately: composer update <vendor>/<package> --with-dependencies, inspect the composer.lock diff for transitive Statamic/core movement, republish CP assets (--force on the assets tag only), clear caches, then smoke-test the Control Panel. Because this package ships built assets tied to a Statamic lock, asset and lock changes are coupled — never update one without the other.
php artisan vendor:publish --tag=<package>-assets --force, then php artisan view:clear && php artisan statamic:stache:clear.public/vendor/<package>, the committed output must match CI's; otherwise the maintainers' deterministic verification (and yours) becomes meaningless.CACHE_STORE=file in production turns replay protection into per-request roulette. Check it in your deploy checklist, not just in .env.example.$request->getContent().composer audit after upgrading.debug level behind a config flag. A silent 200 from the package makes "Postmark says delivered, app says nothing" the hardest class of bug here.class_alias-ing or extending the service provider — 0.x refactors will break it.0.1.x allows breaking changes on minor bumps by definition. Pin 0.1.13 exactly (or ~0.1.13) if your release process can't absorb an unannounced asset or config-key change, and re-read the release notes before each bump — these notes are build-focused, but the 0.1.11 webhook behaviour change would have been easy to miss.How can I help you explore Laravel packages today?