PAM Native Laravel Sync
Start here
Section titled “Start here”Every PAM Native product runs on the PAM runtime. Install and verify PAM first, create a Native application, and add this package through PAM Composer:
curl -fsSL https://github.com/push-in/pam/releases/latest/download/install.sh | shpam doctorpam init my-app --template nativecd my-apppam composer require pushinbr/pam-native-sync-laravelpam doctorpam native devRegister every synchronized collection explicitly:
$registry->register('notes', new NotesSyncHandler());
$engine = new SyncEngine($store, new LaravelSyncTransport($http, $baseUrl));$engine->synchronize(fn (SyncReport $report) => updateSyncStatus($report));SyncCollectionRegistry maps collections to SyncCollectionHandler domain
logic. SyncService orchestrates authenticated push/pull; SyncRepository
persists idempotency and ordered changes; CursorCodec signs bounded cursors;
LaravelSyncTransport connects the mobile engine.
Protect routes with application auth. Keep the HMAC key stable across deploys, define authorization/validation/conflict/retention per collection, and never put secrets in signed-but-unencrypted cursor state. Laravel 12 and 13 are supported.
Laravel HTTP contract
Section titled “Laravel HTTP contract”SyncController validates a SyncRequest, passes its SyncEnvelope and
IncomingOperation values to the service, and returns a
SyncEnvelopeResource. Applied changes and push results serialize through
AppliedChangeResource and PushOutcomeResource; their domain values are
AppliedChange, PushOutcome, and integer-backed OperationStatus.
LaravelSyncServiceProvider registers configuration, migrations, routes and
bindings through Laravel package discovery.
LaravelSyncPluginProvider registers the Native transport. Domain handlers may
raise SyncConflictException when a change cannot be resolved automatically.