PHPackages                             mindgoner/propagator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mindgoner/propagator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mindgoner/propagator
====================

v0.1.0(3mo ago)11MITPHPPHP ^7.4 || ^8.0

Since Jan 21Pushed 3mo agoCompare

[ Source](https://github.com/mindgoner/PropaGator)[ Packagist](https://packagist.org/packages/mindgoner/propagator)[ RSS](/packages/mindgoner-propagator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

[![PropaGator Logo](logo.png)](logo.png)

PropaGator is a Laravel package for recording inbound HTTP requests (webhooks, callbacks, integrations) and propagating them to other environments. It is designed for teams that need a reliable way to capture requests on a public server and replay them locally for development, debugging, and testing.

Key goals:

- Record full HTTP request snapshots (method, path, headers, query, body, IP, UA).
- Normalize timestamps to UTC for cross-environment safety.
- Pull and replay requests on local environments that cannot receive webhooks directly.

Requirements
------------

[](#requirements)

- PHP 7.4+
- Laravel 8+
- Database connection configured

Installation
------------

[](#installation)

Install via Composer:

```
composer require mindgoner/propagator
```

Publish the config and migration:

```
php artisan vendor:publish --tag=propagator-config
php artisan vendor:publish --tag=propagator-migrations
```

Run migrations:

```
php artisan migrate
```

Configuration
-------------

[](#configuration)

All settings are environment-overridable. Add the following to your `.env` as needed:

```
PROPAGATOR_TABLE_PREFIX=propagator_
PROPAGATOR_POLL_INTERVAL=1
PROPAGATOR_REMOTE_URL=https://your-public-app.test/propagator/pull
PROPAGATOR_LOCAL_URL=http://localhost
PROPAGATOR_KEY=your-basic-auth-user
PROPAGATOR_AUTH_SECRET=your-basic-auth-pass
PROPAGATOR_SECRET=shared-encryption-secret
```

Config reference (`config/propagator.php`):

- `table_prefix`: Prefix for the requests table.
- `poll_interval`: Polling frequency in seconds.
- `remote_url`: Fully-qualified pull endpoint on the public server.
- `local_base_url`: Base URL for replaying requests locally.
- `basic_auth.key` / `basic_auth.secret`: Basic auth credentials for the pull endpoint. If `PROPAGATOR_AUTH_SECRET` is not set, it falls back to `PROPAGATOR_SECRET`.
- `timezone`: Fixed to UTC internally.
- `shared_secret`: Shared encryption secret for `/propagator/pull` payloads.

Database Schema
---------------

[](#database-schema)

A publishable migration creates the request log table with the configured prefix. Each record stores:

- `id` (uuid, primary)
- `method`
- `path`
- `headers`
- `query_params`
- `body`
- `ip`
- `user_agent`
- `received_at` (UTC, indexed)
- `created_at`, `updated_at`

Recording Requests
------------------

[](#recording-requests)

Add `Propagator::record($request)` to any controller or middleware where you want to persist incoming requests.

Example controller usage:

```
