Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mailables Viewer Laravel Package

statamic/mailables-viewer

Browse and preview Laravel mailables inside Statamic's control panel. Mailables Viewer surfaces your mailable classes, renders each email, and lets you inspect HTML and text output without leaving the CMS, making it easier to review templates, spot layout issues, and confirm content before mail goes...

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. statamic/mailables-viewer is a thin, low-coupling addon: a service provider, a Control Panel route, and a view that renders a mailable on demand. It does not touch the send path, queue behavior, content model, or schema, so it imposes no architectural constraints and becomes no runtime dependency for our own features. That is the profile a TPM wants from convenience tooling — value concentrated in ergonomics (CP-native access behind existing auth, zero-config discovery) rather than in code we would be locked into. The important framing is scope: this is a review and preview surface, not a testing or deliverability tool. Inbox rendering fidelity (Outlook/Gmail quirks) and automated regression assertions stay with Laravel mailable assertions plus a catcher such as Mailpit or Mailtrap. Naming it "QA tooling" rather than "testing" prevents a mismatch at sign-off.

Integration feasibility. Composer install with addon auto-discovery. No migrations, no schema, no required config publication, no application code changes. The v1.1.0 capability is a query parameter bolted onto an existing route, so engineering effort is measured in minutes and the change is purely additive. The real cost is governance, not code: deciding environment exposure, confirming authorization, and documenting a URL convention so non-engineers actually use it. Because the durable value is the workflow rather than the implementation — the fallback is a route plus a controller plus a Blade wrapper — "adopt" is the correct build-vs-buy call, with the caveat that we are adopting a habit as much as a package.

Technical risk. The material risk sits in the v1.1.0 feature. Resolving a class from a user-supplied query string means instantiating a class named by the request. That requires (a) allowlist or namespace-prefix validation, (b) graceful handling of unknown, abstract, or stale class names, and (c) route authorization in every environment. If the list is derived by scanning registered mailables with validated selection, risk is low; if raw FQCNs are accepted on a reachable route, it becomes an object-instantiation surface and an information-disclosure vector — previews render real content, which can include recipient data or internal-only copy. Secondary risks: mailables with constructor dependencies (models, DTOs) may fail to resolve and will look like a broken feature; the Statamic/Laravel/PHP constraint range is unverified; and the package carries 11 stars, zero dependents, and a single external contributor on this feature, which caps how load-bearing it should ever become. Mitigation is cheap and asymmetric: require-dev, an environment guard, and pinning to ^1.1.

Key questions to close before rollout.

  1. Does ?mailable= accept a raw FQCN, and is it validated against an allowlist or namespace prefix?
  2. Is the viewer route registered in all environments, and is it behind Statamic CP auth or a local/staging guard? Verify from outside the CP, not by reading config.
  3. How are mailables requiring constructor arguments handled — resolved, skipped, or hard error?
  4. Which Statamic/Laravel/PHP majors does v1.1.0 support?
  5. What does an invalid or stale mailable value produce — 404, framework exception page, or silent fallback to the list?
  6. Does the parameter override an existing selection mechanism, and how brittle is a saved link to a class rename?

Integration Approach

Stack fit. Requires Statamic on Laravel; it is an addon, not a drop-in for plain Laravel properties — if a property is not on Statamic, a small bespoke preview route is the better investment and this package should be skipped outright. Install as require-dev so it cannot ship in production artifacts. Zero interaction with application config or content means no coordination cost with other workstreams and no reason to serialize behind a release train. Confirm the addon resolves under each property's current Statamic major before committing: as dev-only tooling, a mismatch blocks a convenience rather than a deploy, but late discovery still burns a sprint.

Migration path. None required. v1.1.0 is additive and backward compatible — existing viewer URLs keep working, the parameter is optional, there is no data or config migration, and no breaking surface. Properties on 1.0.x get a zero-risk upgrade. Properties not yet using the package should treat it as net-new dev-tool adoption and run the full gate below rather than a version bump.

Compatibility. Verify two axes per property. First, constraint satisfaction: Statamic/Laravel/PHP versions against composer.json. Second, functional coverage against the three cases that actually break a deep link — a simple mailable, a mailable with constructor dependencies, and an invalid class name. The constructor-arg case is the most likely false negative: it will be reported as a broken feature rather than a known limitation unless we test it deliberately and document the boundary.

Sequencing.

  1. Confirm Statamic/Laravel/PHP compatibility per property.
  2. Add statamic/mailables-viewer:^1.1 to require-dev; install and verify auto-discovery in local only.
  3. Smoke-test the list view plus the three deep-link cases above.
  4. Answer the authorization and allowlist questions in writing; confirm the route is CP-auth-gated and unreachable outside local/staging.
  5. Document the ?mailable= convention, its allowlist semantics, and the rename caveat in the team runbook, alongside a one-line troubleshooting note for bad input.
  6. Only then announce to design/QA stakeholders, with a short reusable "how to review an email" snippet.

Operational Impact

Maintenance. Low code footprint, low vendor leverage. Pin to ^1.1 and add a review line item at each Statamic major upgrade rather than carrying a standing effort. Because the package is thin, the exit is genuinely cheap — fork, vendor-pin, or replace with a controller and a view. The deep-link pattern is worth copying into any fallback so the workflow investment survives the dependency itself.

Support. No vendor SLA. The support path is GitHub issues plus a named internal owner — realistically the platform or Laravel lead — so the route does not become orphaned tooling that silently breaks. Fallback for breakage is uninstall plus a local preview route or mail catcher, which caps the blast radius of abandonment at roughly an afternoon. The absence of support obligations is also why this should never be positioned as infrastructure.

Scaling. Technically negligible: dev-only, single-user, one request per render, no queue, cache, or database. The scaling consideration is organizational. As the mailable inventory grows, deep links become more valuable and link rot becomes more common, which argues for a maintained class-name-to-purpose mapping in the runbook rather than free-form URLs pasted into tickets.

Failure modes and TPM mitigations.

  • Production exposure — the route being reachable in production is the highest-severity failure and the only one with real blast radius, since previews render real content and may include recipient data. Enforce with require-dev plus an environment guard, and verify externally.
  • Unvalidated FQCN resolution — if the parameter accepts raw class names, this is an object-instantiation surface. Treat allowlist validation as a pre-adoption gate, not an assumption, and fall back to the controller approach if it is absent.
  • Silent link rot — renaming a mailable class breaks saved links with no compile-time protection. Mitigate by linking from the viewer list where possible and recording the FQCN in the ticket next to the URL.
  • Hard error on bad input — an invalid value surfacing a framework exception reads as "broken" to a non-engineer and erodes trust in the tool. Mitigate with a one-line troubleshooting note.
  • Constructor-arg mailables — renders may fail for mailables needing models or DTOs; document as a known limitation so it is not filed as a bug.
  • Version drift — Statamic major upgrades may silently break the addon; the review line item at each upgrade is the control.

Ramp-up. Near zero for engineers — install, open the CP, click a mailable. The investable effort is on the non-engineer side: a five-minute demo plus a documented URL convention converts the tool from a novelty into part of the definition-of-done for any email copy change. Budget that session explicitly; without it, adoption stalls at "the developers use it" and the feedback-loop savings — the hours-per-change round trip we are trying to eliminate — never materialize. Success looks like a PM or designer opening a deep link from a ticket without asking an engineer, and a release checklist line reading "verify all transactional mailables post-deploy."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource