Skip to main content

Worked example — active re-consent

A material change to the core of the contract still requires active agreement, with the full grace period and a hard gate at the deadline:

php artisan legal-consent:publish terms de --active \
--announce-at=2026-07-01 --enforce-at=2026-09-01

An account page during the grace period, with a yellow banner above its heading: a warning sign, "Terms of Use" with the version v2.0.0, and the link "Review now".

Both dates are validated​

You cannot smuggle a short lead by omitting --announce-at, and the minimum period is per regime (§ 675g's two months is hard).

Nor by backdating it. The period runs from the first day a notice can go out, and nothing is sent before the version is published, so an --announce-at on a day already past is measured as today. The date is still stored as given, and the notice goes out with the next dispatch.

Since 0.19.0 the order itself is checked as well, before any mode or regime rule runs: an --announce-at that falls after --enforce-at is refused rather than frozen. A change cannot take effect before it was announced, and the stored notice_period_days can no longer be negative.

An --enforce-at in the past with no --announce-at is unaffected — that is the documented immediate gate, and it now freezes a period of 0 rather than a negative number.

Use a future --enforce-at: the lead-time guard only runs while the effective date is still ahead, so an already-past date publishes an immediate gate with no grace. The dates above are illustrative — pick your own.

What happens at the deadline​

From enforce_from, the middleware blocks the subject until they re-accept the new major version.

The page the gate redirects to the day after the new version binds: under the page's heading "Our terms have changed", the re-consent form with one checkbox, "I accept the Terms of Use.", and an "Accept and continue" button.

A SHA-256 hash detects any text change; a human classifies it (the notice mode) at publish time; the gate compares major_version only.

Which subjects the gate blocks at all is configurable — see gate.subject_filter in the configuration reference — and the route it redirects to is routes.consent_name.