WPHammer
Log in

Public Report Sharing

Published reports are accessible via a public URL that does not require authentication. This makes it straightforward to share monthly reports with clients who do not have WPHammer accounts.

Public URLs

Each published report has a public URL generated by the publicUrl() method on the SiteReport model. The URL follows this pattern:

/reports/{siteReport}/{locale?}

The SiteReportController@show action handles public requests:

  1. Loads the report with its site and team relationships
  2. Returns a 404 if the site has been deleted or the report is not published
  3. Sets the application locale based on the URL parameter (defaults to en)
  4. Renders the reports.show view with the report data, site, team, cached sections, and locale

No authentication is required — anyone with the URL can view a published report.

Draft previews

Before publishing, you can preview how a report will look using the preview URL:

/reports/{siteReport}/preview/{locale?}

The SiteReportController@preview action requires authorization (checked via a Gate) and renders the same view with an isPreview flag. This lets you review the report content, branding, and layout before making it public.

Locale support

Both public and preview URLs accept an optional locale parameter. The controller dynamically sets the application locale, which affects section labels and UI text in the rendered report. Currently supported locales include English (en) and French (fr).

Unavailable reports

If a report's site has been deleted, the controller renders a reports.unavailable view instead of returning a raw 404. This provides a more informative experience for anyone following a previously shared link.

Copying the link

From the site reports panel, you can copy the public URL to your clipboard for any published report. Draft reports show a preview option instead, opening the report in a modal iframe for review.

Report branding

Published reports display the team's configured branding:

  • Logo — displayed in the report header if configured
  • Company name — shown alongside the report title
  • Accent color — applied to headings and key UI elements
  • Footer text — rendered at the bottom of the report

See Report Configuration for details on setting up branding.

Related