Download the PHP package gramercytech/laravel-claim-check without Composer

On this page you can find all versions of the php package gramercytech/laravel-claim-check. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-claim-check

laravel-claim-check

PHP Tests JS Tests

Bypass Pusher's 10KB broadcast payload limit (and similar limits on other broadcasters) using the claim-check pattern: oversized messages are stored server-side in a cache and replaced with a small stub. Clients transparently fetch the full payload on receipt — your application code doesn't change.

Status: v0.1.0 · scaffold complete, integration-tested, not yet published.

Why

Pusher Cloud caps broadcast payloads at 10KB. As applications grow — AI streaming, rich notifications, large change events — that limit is hit sooner than expected, often without warning, and Pusher silently drops the message. Reducing payload size per-event is fine for one or two cases, but doesn't scale.

This package solves the problem at the broadcaster layer:

The pattern is broadcaster-agnostic — it works with Pusher, Ably, Reverb, Soketi, or anything you can wrap.

Install

In your .env:

That's it. The package auto-registers a claim-check connection so you don't need to touch config/broadcasting.php at all — your existing Pusher (or other) connection is wrapped via the inner setting in config/claim-check.php.

⚠️ Match your /broadcasting/auth middleware. The fetch endpoint defaults to ['web'], which only works for classic session-authenticated apps. If your BroadcastServiceProvider does Broadcast::routes(['middleware' => ['web', 'auth:sanctum']]) (the usual setup for Inertia / Sanctum / SPA apps), set the same middleware in config/claim-check.php under route.middleware. Otherwise $request->user() will be null when your channel auth callbacks run and every fetch will 403.

Multiple claim-check connections (optional)

If you want more than one (e.g. a low-threshold connection for chat and a high-threshold one for analytics), explicitly add them to config/broadcasting.php — any setting from config/claim-check.php can be overridden per-connection:

Switch via BROADCAST_DRIVER=pusher-cc-aggressive.

Configure

config/claim-check.php:

Key Default Description
inner pusher The underlying broadcasting connection name.
threshold 8192 Bytes; payloads over this are claim-checked. Set to 0 to claim-check every non-empty payload.
ttl 120 Seconds the cached payload is retrievable for.
store null Cache store name (defaults to your default cache).
cache_prefix cc: Cache key prefix.
route.uri claim-check Fetch endpoint URI.
route.middleware ['web'] Middleware applied to the fetch endpoint.
allow_encrypted false Whether to claim-check private-encrypted-* channels.
on_store_failure fall_through fall_through or throw.
allow [] If non-empty, only events in this list are eligible for claim-check.
skip [] Events in this list are never claim-checked, even when oversized.
always [] Events in this list are always claim-checked regardless of size.

Every key can also be overridden per-connection in config/broadcasting.php — see "Multiple claim-check connections" above.

Event filter precedence

Events are matched against whatever string Laravel passes as the broadcast event identifier — by default the FQCN, or the return value of broadcastAs() if your event implements it.

The four lists are applied in this order:

  1. Allow — if non-empty and the event is not in it, pass through unchanged.
  2. Skip — if the event is in skip, pass through unchanged.
  3. Always — if the event is in always, claim-check (ignore size).
  4. Threshold — claim-check when payload size exceeds the threshold.

Implications:

How it works

Security

If you need rate-limiting or additional auth on the fetch endpoint, add your own middleware via config('claim-check.route.middleware').

Frontend

See js/README.md for the companion npm package.

Testing

Tests use Pest 2/3 + Orchestra Testbench. A spy broadcaster is used as the inner driver so assertions can inspect what would have been sent to Pusher.

Roadmap (post-v1.0)

Releasing

Maintainers: see RELEASING.md for the cut-a-release runbook and the one-time Packagist/npm setup.

License

MIT — see LICENSE.md.


All versions of laravel-claim-check with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/broadcasting Version ^10.0|^11.0|^12.0
illuminate/cache Version ^10.0|^11.0|^12.0
illuminate/contracts Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/support Version ^10.0|^11.0|^12.0
psr/log Version ^1.0|^2.0|^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gramercytech/laravel-claim-check contains the following files

Loading the files please wait ...