<!-- Source: @site/projects/visual-feedback-for-laravel/docs/delivery-channels.md -->
<!-- Canonical: https://docs.pushery.com/visual-feedback-for-laravel/delivery-channels/ -->

# Delivery channels

> Where a report goes — mail, database, webhook — and how to add a channel of your own.

A report is handed to every enabled channel independently: one failing channel never
stops another, and each has its own queue connection, queue, retry count and backoff.

A channel's `backoff` is the seconds between its retries, or a list of them, one per retry,
which the queue repeats from its last entry: `'backoff' => [30, 120, 300]` waits half a minute,
then two minutes, then five. A value that is neither falls back to 30 seconds.

**Every channel queues its job**, so nothing is delivered in the request the reporter
submitted — and nothing is delivered at all until a worker consumes the queue. On the
`database` connection a fresh Laravel application resolves to, the job waits in the
`jobs` table while the widget goes on reporting success. See
[Installation](https://docs.pushery.com/visual-feedback-for-laravel/installation.md).

- **Mail** (on by default) — a formatted report to your maintainer address, with the
  screenshot and attachments included and `Reply-To` set to the reporter. The body names who
  reported it — name, guest or signed-in member, email and phone where they gave them, the
  submission time and the widget mode — which matters most in exactly this configuration: with
  the database channel off, the mail is the only copy of the report that exists. Both of those are
  defaults with a switch behind them, which is worth knowing before you work around them:
  `mail.attach_files` (`true`) decides whether the files ride along or the mail carries only the
  text, and `mail.reply_to_reporter` (`true`) decides whether replying goes to the reporter or to
  your own sender address. An address that carries a control character, or that fails the strict
  RFC reading the guest form applies (a comment, a quoted local part, folding whitespace), is left
  out of `Reply-To` and appears in the body only. Turning the
  first off is the usual answer to a mailbox quota or a scanner that quarantines attachments — the
  files stay on the disk either way, so nothing is lost by it.

  The subject line has a switch of its own. The subject field is optional, so a report often
  arrives without one, and the mail then names the category plus the first words of the message:
  `Bug - the sidebar overlaps the content on mobile`. `mail.subject_excerpt_length` (`60`) sets
  how much of the message goes in, cut on characters and moved back to a word boundary where one
  is close. Set it to `0` for the category alone, which is what this package sent before 0.9.0 —
  an inbox of twenty reports then reads as twenty identical lines, which is why it changed.

  The mail is styled with the theme your application configures in `mail.markdown.theme`, plus
  a few rules of its own. The subject and the message are set as code blocks, so the reporter's
  text is never read as Markdown, and the rules set them in the face and size of the text around
  them and let a long line wrap on a phone instead of running off the edge. The lists of a label
  and a value stand without bullets, and a label in the table of technical details keeps its line.

  ![The report as the mail channel delivers it, from Linen & Co to team@shop.example with the subject "The total of order #1046 does not add up". Under the heading Bug, the subject and the message in the face of the text around them. Then who reported it, a label and a value per line: a guest named Lea Brandt with her email, when the report arrived, with the time zone, and the widget mode, Dialog. Under "1 attachment" stands its file name, orders.png, and a table of technical details lists the URL, the page title, the browser, the viewport, the pixel ratio, the language, the time zone, dark mode with No and the capture method "Drawn from the page", reported by the browser. The report ID closes it.](https://docs.pushery.com/assets/images/report-mail-63a3c8bc0c1563dd105582adb683a7a2.webp)

  **The channel needs a mailer that can actually send, not merely one that is configured.**
  `MAIL_MAILER=log` and `array` both let `Mailer::send()` succeed while the message goes
  nowhere, so a report used to walk the whole happy path — a `delivered` receipt, a
  `ReportDelivered` event, its attachments released, and a thank-you on screen — with nothing
  having left the building. The channel now reports itself unavailable for those, resolving
  `failover` and `roundrobin` into their members first: a chain that ends on `log` works only for
  as long as the real transport has a good day. Set
  `VISUAL_FEEDBACK_MAIL_REQUIRE_DELIVERABLE_TRANSPORT=false` to send through one on purpose, or
  name a mailer for reports alone with `VISUAL_FEEDBACK_MAIL_MAILER`, which the check then reads
  instead of `MAIL_MAILER`.

  **The `log` transport writes the whole message into your log**, and that is a privacy
  question rather than a debugging convenience: the reporter's free text, their address in
  `Reply-To` and the screenshot as base64 all land there in plaintext — one measured report was
  117 kB — and travel onward to every error tracker your log stack feeds.
- **Database** (opt-in) — publish `visual-feedback-migrations` and migrate. Reports
  stored here are kept until you prune them — and pruning has one condition worth reading
  before you build a deletion policy on it, in
  [Privacy and retention](https://docs.pushery.com/visual-feedback-for-laravel/privacy-and-retention.md#the-window-is-a-minimum-not-a-maximum). The **table and its columns** are public
  API — there is no Eloquent model, deliberately, so nothing here decides what yours
  should be called or which traits it carries. Point your own model at the table, or
  query it directly; both are supported and the recipe below uses the query builder.
- **Webhook** (opt-in) — a minimized, HMAC-signed payload. It carries no file paths and
  no binaries. If `pushery/webhooks-for-laravel` **2.0 or newer** is installed the payload
  goes through it; otherwise the package posts it itself to the configured URL.

  Posting it itself needs **both** a `url` and a `secret`, and gives up after
  `webhook.timeout` seconds (**5** by default) — the queue then retries the job, so a slow
  receiver costs a retry rather than a lost report. Without a secret the channel
  reports itself unavailable and is skipped, with a line in the log — because an empty
  HMAC key does not produce a broken signature, it produces one anybody who knows your
  endpoint URL can reproduce. If your receiver ignores the signature header entirely —
  Zapier, n8n, a Slack incoming webhook, anything that authenticates by unguessable URL —
  then any string satisfies this; set one and move on.

  The version matters and the failure is quiet. That package renamed its facade in 2.0, and
  this bridge looks the class up by its 2.0 name — so with 1.x installed the bridge
  does not see it. Nothing is logged and nothing throws: the report falls back to being
  posted directly, which is correct only if you set both a `url` and a `secret`. With either
  missing, the channel reports itself unavailable and is skipped — no job is queued and nothing
  fails, so the only trace is `an enabled channel reported itself unavailable and was skipped`
  in the log. Either upgrade to 2.0, or configure a `url` and a `secret`.

## Verifying a webhook

The request carries three headers:

| Header | What it is |
|---|---|
| `X-Visual-Feedback-Signature` | hex HMAC-SHA256, keyed with your `secret` |
| `X-Visual-Feedback-Timestamp` | Unix timestamp, and part of the signed input |
| `X-Visual-Feedback-Id` | the report UUID — your idempotency key |

The signed input is **`{timestamp}.{rawBody}`**, not the body on its own. The timestamp is
inside the MAC so a captured request cannot be replayed later with its own header rewritten,
and you must recompute over the **raw** bytes you received: re-encoding the decoded JSON
changes key order and whitespace, and the MAC will not match.

<!-- vf:webhook-verify-recipe -->
```php
$request = request(); // the request your receiving route was called with
$secret = config('services.visual_feedback.secret');

// Check the key BEFORE using it. hash_hmac() returns the same digest for a null key and an
// empty one, so an unconfigured secret does not break verification — it makes it accept
// anything a stranger who knows this URL can compute.
abort_unless(is_string($secret) && $secret !== '', 500);

$raw = $request->getContent();
$timestamp = $request->header('X-Visual-Feedback-Timestamp', '');
$expected = hash_hmac('sha256', $timestamp.'.'.$raw, $secret);

// hash_equals, never ===: a plain comparison returns early on the first differing byte, and
// the timing tells an attacker how much of a forged signature was right.
abort_unless(hash_equals($expected, (string) $request->header('X-Visual-Feedback-Signature')), 403);

// Reject anything older than your tolerance, or the replay protection above buys nothing.
abort_if(abs(time() - (int) $timestamp) > 300, 403);
```

Write your own channel by implementing `Pushery\VisualFeedback\Contracts\ReportChannel` —
three methods: `key(): string`, `isAvailable(): bool` and `dispatch(Report $report): void`.
Register the factory in a service provider's `boot()`:

```php
use App\Feedback\SlackReportChannel;
use Pushery\VisualFeedback\Facades\VisualFeedback;

VisualFeedback::extend('slack', fn () => new SlackReportChannel());
```

Then enable it in `config/visual-feedback.php`. **A channel is enabled by its
`enabled` key, not by a bare boolean** — every channel is an array so it gets its own queue
tuning, and `'slack' => true` reads as "no `enabled` key", which means off:

```php
'channels' => [
    // …
    'slack' => [
        'enabled' => true,
    ],
],
```

`enabled` is the only key the package reads for a channel of yours. The `connection`, `queue`, `tries` and
`backoff` entries next to it belong to the built-in channels, which read their own block when
they build their own job — your `dispatch()` decides how, or whether, it queues.

### If your channel STORES the report, implement `RetainsReport`

```php
namespace App\Feedback;

use Pushery\VisualFeedback\Contracts\ReportChannel;
use Pushery\VisualFeedback\Contracts\RetainsReport;

final class ArchiveReportChannel implements ReportChannel, RetainsReport
{
    // …
}
```

`RetainsReport` is a marker with no methods, and skipping it costs you the attachments.

The package refcounts a report's files against its channels. A **transient** channel — mail, a
webhook — needs the screenshot only long enough to send it, so once the last transient delivery
settles, the files are deleted. That is the right default: nothing should keep a stranger's
screenshot on disk for no reason.

A channel that stores the report for someone to open later is not transient, and the marker is
how the package can tell. Implement it and the automatic delete is switched off for that report
entirely — the files then belong to `retention`, which removes the row and its files together
when the report ages out. The built-in database channel is the example.

Get this wrong and nothing fails: the delivery succeeds, the row is written, and the screenshot
is gone by the time anybody opens it.

### Other seams

Two more interfaces a host can implement, both resolved from the container:

- **`ResolvesReporter`** — who the reporter *is*. The default reads the auth guard and takes the
  `name` and `email` attributes from the user itself, whatever its `$hidden` or `$visible` say;
  bind your own to enrich the `Reporter` from team, tenant or account context. The guest form
  fields are passed in for the unauthenticated path.
- **`PrivacyNoticeSource`** — where the guest privacy notice comes from. This is the contract
  behind the FQCN form of `privacy.source`: it returns the URL a guest acknowledges.
  **`PrivacyNoticeWordingSource`** extends it for a source that can supply the acknowledgment
  *sentence* as well as a link — which is what the `legal-consent` bridge uses, because that
  package deliberately has no notice URL to give. Supplying a wording is a capability rather than
  a duty, which is why it is a second interface: a host with nothing but a URL implements the base
  one and is done.

### Attaching your own context

`ReportContextProvider` is what fills `config('visual-feedback.context_providers')`. It has one
method, and every provider registered there runs on every report:

```php
namespace App\Feedback;

use Pushery\VisualFeedback\Contracts\ReportContextProvider;
use Pushery\VisualFeedback\Data\ReportContextEntry;

final class TenantContext implements ReportContextProvider
{
    /** @return list<ReportContextEntry> */
    public function entries(): array
    {
        return [new ReportContextEntry(
            key: 'tenant',
            label: 'Tenant',
            value: (string) auth()->user()?->tenant_id,
        )];
    }
}
```

**Authorizing what you expose is YOUR duty, and it has no second line of defense.** A report
travels to a mailbox, a webhook and possibly a database row, so an entry naming something the
current user may not see is a leak with a long tail. The package cannot judge that for you: it
does not know what your entries mean.

What it does guarantee is that there is only ONE way in. The context path is server-side only —
no client-callable action sets context — so `entries()` is the single trusted source. That is
deliberate and it is a fix rather than a design note: there used to be two context-setting paths,
one authorized and one not.

**A broken provider costs the report its context, never the report.** Return `ReportContextEntry`
objects only: anything else in the list, an array with a `label` and a `value` for instance, is
skipped with a warning in your log that names the provider and the types it skipped, and the
entries around it are kept. A provider that throws, and a configured class that cannot be built
or does not implement the interface, is skipped with a warning the same way.

Per-instance context is a different thing and does not go through this interface: pass it as
mount props on the widget.

The registration and the config key are two halves of one switch: registering alone delivers
nothing, and enabling a key nobody registered does nothing at all. `isAvailable()` is the
third — return `false` while the channel's own settings are incomplete and it is skipped with
a line in the log, exactly as the built-in ones are.

A channel that holds for some requests only, such as one tenant's, one host's or one shop's,
implements `Pushery\VisualFeedback\Contracts\AppliesToTheRequest` as well. Its
`appliesToThisRequest(): bool` is asked before `isAvailable()`, and `false` skips the channel for
that report with a debug line and no warning, because nothing about it is missing:

```php
namespace App\Feedback;

use Pushery\VisualFeedback\Contracts\AppliesToTheRequest;
use Pushery\VisualFeedback\Contracts\ReportChannel;

final class ShopReportChannel implements AppliesToTheRequest, ReportChannel
{
    public function appliesToThisRequest(): bool
    {
        // However your application knows the shop of a request, such as a value your middleware set.
        return request()->attributes->has('shop');
    }

    // key(), isAvailable() and dispatch() as above.
}
```

`isAvailable()` keeps its warning for a channel that applies and cannot deliver.

## Events

Events are dispatched around the whole lifecycle, so you can hook in without touching a
channel. They all sit in the package's `Events` namespace. See
[Testing](https://docs.pushery.com/visual-feedback-for-laravel/testing.md) for asserting on them.

| Event | Carries | Dispatched |
|---|---|---|
| `ReportSubmitting` | `$report` — and it can be **vetoed**, see below | before anything is stored or delivered |
| `ReportSubmitted` | `$report`, the whole thing | after the report is accepted |
| `ReportRejected` | `$reason` (a `RejectionReason`), `$detail` (nullable) | when a submission is refused |
| `ReportDelivered` | `$reportUuid`, `$channel` | per channel, on success |
| `ReportDeliveryFailed` | `$reportUuid`, `$channel`, `$exceptionClass`, `$message` | per channel, on failure |
| `ScreenshotAttached` | `$reportUuid`, `$path` | when a capture is stored |
| `InstanceRateLimitReached` | `$limit`, `$windowSeconds` | once per window, when `abuse.global_rate_limit` is reached |

Everything except `ReportSubmitting` is `readonly` — a listener observes, it does not edit.

`RejectionReason` is an enum with nine cases: `Honeypot`, `RateLimited`, `Validation`,
`ChallengeFailed`, `ListenerRejected`, `Disabled`, `GateUnavailable`, `GlobalRateLimited` and
`AuthenticationRequired`.

`AuthenticationRequired` is the sibling of `Disabled` rather than of anything under `abuse`: both
say an operator decided who may report and somebody arrived outside that decision. It is what
`require_authentication` refuses a guest session with — usually a real person whose session expired
while the tab was open.

Two of the others pair off with a neighbor and the difference is the whole reason they are separate
cases:

- `GateUnavailable` against `ChallengeFailed`. That one says the submission was judged and refused;
  this one says an additional abuse driver threw and is configured to fail closed, so nobody judged
  it at all. One is bot traffic, the other is your provider's incident.
- `GlobalRateLimited` against `RateLimited`. That one says this sender has had their share; this one
  says the whole application has — `abuse.global_rate_limit` — which is either a distributed bot or
  a day nobody planned for, and in both cases legitimate reporters are being turned away.

See [Abuse protection](https://docs.pushery.com/visual-feedback-for-laravel/abuse-protection.md) for both settings.

`$detail` is the second half of that answer, and it exists because the enum is coarser than the
check: three different things fire `Honeypot`, and a listener that only reads the reason cannot
tell them apart. It carries one of these, and `null` everywhere else:

| Reason | `$detail` |
|---|---|
| `Honeypot` | `'honeypot'` — the hidden field came back filled |
| `Honeypot` | `'too_fast'` — the form was submitted inside `abuse.min_fill_seconds` |
| `Honeypot` | `'open_time_missing'` — the signed open-time was absent or unreadable, so the time trap had nothing to measure against |
| `ListenerRejected` | whatever string your veto passed to `reject()`, or `''` if it passed none — see [Vetoing a submission](#vetoing-a-submission) |
| everything else | `null`, unless a custom gate you registered set one |

The three floor values are stable strings and safe to compare against. `'open_time_missing'` is
the one worth alerting on separately: the other two are a bot behaving like a bot, while a page
that stopped sending its open-time usually means a cached template or a stripped hidden field, and
that is your own deployment rather than an attacker.

```php
use Illuminate\Support\Facades\Event;
use Pushery\VisualFeedback\Events\ReportDeliveryFailed;

Event::listen(function (ReportDeliveryFailed $event): void {
    logger()->warning('feedback delivery failed', [
        'report' => $event->reportUuid,
        'channel' => $event->channel,
        'exception' => $event->exceptionClass,
    ]);
});
```

A listener on `ReportDelivered` or `ReportDeliveryFailed` that throws does not fail the delivery.
Both fire inside the channel's queued job after the mail went out or the webhook was posted, and a
failed job would send it again on its retry. The exception goes to your exception handler instead,
and the receipt and the attachment cleanup complete as usual. The listener is not retried either,
so queue it (`ShouldQueue`) when it calls a service that can be down.

The bookkeeping after a delivery lives in your default cache store: the receipt, the claim that
makes each channel settle once, and the attachment counter. When the cache refuses it after the
mail went out or the webhook was posted, the channel's job still ends, so its retry cannot send
the report a second time. A `SettleDelivery` job on the same connection and queue retries the
bookkeeping with the channel's `tries` and `backoff`, and `ReportDelivered` fires once that job
gets through. While the cache is down, the event can therefore arrive well after the delivery.

The bookkeeping also has to outlast the delivery, and an entry the store loses early takes what it
held with it. A lost claim lets a later settle of the same channel count as its first, so
`ReportDelivered` or `ReportDeliveryFailed` can fire a second time, and the attachment counter can
step down twice and delete the files while another channel still needs them. A lost receipt can
keep the stored row of a report from learning that a sibling channel settled: the row reads that
delivery as pending, and with `retention.prune_delivered_only` on, `visual-feedback:prune` keeps
the report past its window. A lost counter leaves the files to `visual-feedback:sweep-orphans`. A
store loses entries in three ways:

- **It evicts under memory pressure.** Redis does under every `maxmemory-policy` but
  `noeviction`, the `volatile-*` policies included, because every entry here carries a TTL.
  Memcached evicts by its LRU unless it runs with `-M`.
- **It is flushed.** `php artisan cache:clear` and `optimize:clear` flush the default store, and a
  deploy often runs one of them. A Redis store flushes the whole database of its connection, a
  database store every row of its table.
- **It restarts without persistence.** Redis does without `appendonly yes`, Memcached every time.

So choose a default store that keeps its entries: the database store, or Redis with
`maxmemory-policy noeviction` and `appendonly yes`. Use Memcached only with `-M`, or not at all. A
Redis under `noeviction` that has filled up evicts nothing and refuses every write instead, so give
it the memory everything your application caches needs. A deploy that rebuilds its caches with
`php artisan optimize` leaves the store alone, while `cache:clear` and `optimize:clear` take every
entry with them. The erasure records of `visual-feedback:forget` live in the same store, and on the
database store the expired entries need a pruning of their own, both described in
[Privacy and retention](https://docs.pushery.com/visual-feedback-for-laravel/privacy-and-retention.md).

Note what `ReportDelivered` and its siblings carry: the report's **UUID**, not the report. They
are dispatched from queued jobs, so a whole object would have to survive serialization — and a
report holds the reporter's own words. The uuid is what a listener needs to correlate, and it is
the same value the optional table stores.

`$message` is safe to forward to a chat channel or a ticket for the same reason. Some failures
would otherwise put a secret into it, so their text is cut down before the event fires:

- a database error keeps its SQLSTATE, its driver code and the connection name, and leaves out
  the statement, whose values are the report;
- an HTTP error response keeps its status code and leaves out the body, which can echo the
  payload;
- a URL in any other message keeps its scheme, host and port, and loses its user info, path,
  query and fragment. The path of a Slack, Zapier or n8n webhook is its credential.

`$exceptionClass` stays the class of the original failure. The package's own log lines get the
same treatment, and so does what a delivery job throws: the queue worker reports that to your
error tracker and keeps it in the failed jobs, so a job throws a
`Pushery\VisualFeedback\Support\RedactedFailure` in place of a failure whose text had to change.

### Vetoing a submission

`ReportSubmitting` is the one event a listener may act on rather than observe. Call `reject()`
and the submission stops: nothing is stored, no channel runs, and the reporter is answered by
the widget's own message.

```php
use Illuminate\Support\Facades\Event;
use Pushery\VisualFeedback\Events\ReportSubmitting;

Event::listen(function (ReportSubmitting $event): void {
    if (str_contains($event->report->message, 'http://')) {
        $event->reject('links are not accepted here');
    }
});
```

The string is for **you** — it reaches your logs and `ReportRejected::$detail`, never the
reporter's screen. The reporter sees the package's own generic line, in their locale: a veto
happens for reasons a submitter usually may not be told, and a message written for a log is not
a message written for a stranger. `RejectionReason::ListenerRejected` is what the resulting
`ReportRejected` carries.

An empty `reject()` is a veto too — the argument defaults to `''`, and `isRejected()` reads the
difference between "not rejected" and "rejected without a note", which a plain string could not.

**Two things decide whether your listener works at all, and both are easy to get wrong:**

- **Only a SYNCHRONOUS listener can veto.** The pipeline dispatches the event and reads
  `isRejected()` on the very next line, so a queued listener returns long after the decision was
  made. It will still run, and it will still be ignored.
- **The report is not validated yet.** `ReportSubmitting` fires at step 3 of the pipeline and
  validation is step 4, which is deliberate — a veto should not have to wait for rules it does
  not care about. The consequence is yours to handle: `$event->report->message` is whatever the
  reporter typed, at whatever length, and the abuse floor (honeypot, time trap, rate limit) is
  the only thing that has run before you. Treat it as untrusted input, because it is.

What HAS happened by then is the report's identity: the uuid on `$event->report` is the final
one, so a veto can be correlated with the `ReportRejected` that follows it.

## The Matomo bridge

The package ships one listener of its own on `ReportSubmitted`, and it needs saying because
nothing switches it on: **if `pushery/matomo-analytics-for-laravel` is installed, every
accepted report is tracked as a Matomo event** — category `visual-feedback`, action `submit`,
name the report's own category. Without that package the listener is a no-op.

It listens on `ReportSubmitted` only, never on `ReportRejected`, so a honeypot hit or a
rate-limited bot is never counted as real traffic. Everything else is configuration:

```php
// config/visual-feedback.php
'matomo' => [
    'enabled' => true,                       // VISUAL_FEEDBACK_MATOMO_ENABLED
    'event' => [
        'category' => 'feedback',            // VISUAL_FEEDBACK_MATOMO_EVENT_CATEGORY
        'action' => 'submit-{mode}',         // VISUAL_FEEDBACK_MATOMO_EVENT_ACTION
    ],
    'instances' => [
        'contact' => ['category' => 'contact'],
    ],
    'skip' => \App\Analytics\SkipAdministrators::class,
],
```

`{mode}` is the widget's mode, `modal` or `inline`. `matomo.instances` names the event of a
widget mounted with that [`instance`](https://docs.pushery.com/visual-feedback-for-laravel/placing-the-trigger.md#two-modal-widgets-on-one-page) name,
and only of a name listed there, so no request reaches an event name you did not write. The
widget seals its name with its other mount props. A blank value keeps the shipped name.

`matomo.skip` names an invokable class, resolved from the container, that answers `true` for a
report that is not tracked:

```php
namespace App\Analytics;

use Pushery\VisualFeedback\Events\ReportSubmitted;

final class SkipAdministrators
{
    public function __invoke(ReportSubmitted $event): bool
    {
        return request()->user()?->is_admin === true;
    }
}
```

The listener runs while the report is submitted, so the request is the reporter's. A hook that
throws, or a key that names nothing invokable, costs the event and a warning in the log, never
the report.

## Browsing stored reports

No admin UI is installed, and that is deliberate: a list screen is a handful of lines
against a table you own, and shipping one as part of the install would mean shipping
opinions about your auth, your layout and your pagination — three things a package cannot
know. Here is the whole recipe.

There is one exception, and it is opt-in rather than installed: the
[report browser](https://docs.pushery.com/visual-feedback-for-laravel/report-browser.md), a minimal Livewire view that stays unreachable until
you route it and open a gate. Take it when you want to READ your feedback without building
anything; build against the table when you want a real console.

```php
use Illuminate\Support\Facades\DB;

$table = config('visual-feedback.database.table', 'visual_feedback_reports');
$category = request()->query('category'); // the filters of your own screen
$since = request()->date('since');

$reports = DB::table($table)
    ->when($category, fn ($q) => $q->where('category', $category))
    ->when($since, fn ($q) => $q->where('created_at', '>=', $since))
    ->latest('created_at')
    ->paginate(25);
```

Four columns carry JSON — `context`, `metadata`, `attachments` and `deliveries` — so decode
them where you read them:

```php
$report = $reports->first(); // one row of the page above
$context = json_decode($report->context, true, flags: JSON_THROW_ON_ERROR);
$files = json_decode($report->attachments, true, flags: JSON_THROW_ON_ERROR);
```

```blade
@foreach ($reports as $report)
    <article>
        <h2>{{ $report->subject ?: __('visual-feedback::messages.categories.'.$report->category) }}</h2>
        <p>{{ $report->message }}</p>
        <small>{{ $report->reporter_email ?? __('Guest') }} · {{ $report->created_at }}</small>
    </article>
@endforeach
```

Two things to get right, because neither is obvious:

- **`attachments` holds storage PATHS on a private disk, never URLs.** Serve a file through
  your own authorized controller with `Storage::disk(config('visual-feedback.attachments.disk'))->download($path)`
  — linking the path directly either 404s or, if the disk is public, hands every screenshot
  to anyone who guesses a filename. Screenshots contain whatever the reporter had on screen.
- **Deleting a row does not delete its files.** `visual-feedback:prune` and
  `visual-feedback:forget` remove both; a hand-written `DELETE` leaves the attachments
  behind, and `visual-feedback:sweep-orphans` is what collects them afterwards.
