Context
Same idea as #7 for Laravel apps that follow framework best practices: a composer package whose service provider listens to the standard Laravel surface (auth events, Eloquent model observers, commerce-shaped models) and forwards the standard taxonomy (docs/events.md, #6). This is our own package; its only dependency is laravel/framework (illuminate components) - no third-party HTTP clients or queues.
Scope
- Composer package
reportshq/laravel(repostacksjs/reportshq-laravel): service provider with auto-discovery,config/reportshq.phppublishable (key, endpoint, per-domain toggles, sampling, queue connection). - Listeners for built-in events:
Illuminate\Auth\Events\{Registered, Login}touser.registered/user.login; a small observer-registration API for the app's own models (ReportsHQ::observe(Order::class, OrderMapper::class)) plus shipped mappers for conventional commerce models (order withtotal/currency, refund, customer). - Transport: batched, queueable (dispatch to the app's queue when configured, sync-with-terminating-callback fallback), Laravel's HTTP client, bounded retry, never throws into the host app's request path.
- Taxonomy fidelity: payloads byte-compatible with
docs/events.md; a shared JSON fixture set in this repo asserts both SDKs (#7 and this one) produce identical shapes for the same logical event. - Tests with Laravel's package test tooling (phpunit, orchestral-free if possible - keep dependencies to the illuminate surface).
- README quickstart: composer require, env vars, one observer registration, screenshot-free.
- Versioned release (tagged; packagist submission can wait for launch).
Acceptance
- A demo Laravel app (script or CI job) fires
Registered+ an order-model create and both arrive through/ingest(#6) with taxonomy-correct payloads; the cross-SDK fixture test passes.
Depends on #6. Feeds #14. Related to #7. Part of #1 (M5 Integrations and auto-reports). Ground rules: see #1.