bentools/pusher
Send Web Push notifications to multiple recipients across providers (Chrome/GCM, Mozilla) using async/parallel Guzzle requests. Supports multiple API keys, ping/notification/server messages, and per-recipient delivery reporting for unsubscribes. Unmaintained.
Illuminate\Bus\Queueable). The Pusher service’s state management (pending → done) mirrors Laravel’s job lifecycle.minishlink/web-push, which is synchronous by default).push.failed events).Push objects in Laravel jobs (e.g., SendPushJob) for async execution via queue:work.app.bind(GCMHandler::class, fn() => new GCMHandler(config('services.gcm.key')))).PushSent, PushFailed) to trigger downstream actions (e.g., analytics, retries).Push states (e.g., id, status, recipients, created_at). Laravel’s migrations can scaffold this.subscriptions table (e.g., endpoint, provider, auth_key) to map to Recipient objects.GCMHandler stubs).concurrency).memory_get_usage()).minishlink/web-push (actively maintained) or spatie/laravel-webpush (Laravel-specific)?Push logic in Illuminate\Bus\Queueable jobs (e.g., SendWebPushJob).app.bind(HandlerInterface::class, GCMHandler::class)).PushSent, PushFailed) using Laravel’s event system.^6.5 in composer.json (conflict with Laravel’s Guzzle 7+).Schema::create('pushes', function (Blueprint $table) {
$table->id();
$table->string('status')->default('pending'); // pending, done, failed
$table->json('recipients'); // Array of {endpoint, provider, handler}
$table->json('metadata'); // Custom payload
$table->timestamps();
});
Schema::create('push_subscriptions', function (Blueprint $table) {
$table->id();
$table->string('endpoint'); // User’s push endpoint
$table->string('provider'); // 'gcm', 'mozilla'
$table->string('auth_key');
$table->foreignId('user_id')->constrained();
$table->timestamps();
});
queue:work --daemon.Push objects.GuzzleHttp\HandlerStack middleware).Laravel\Queue\Failed\FailedJob).database, redis, and beanstalkd (avoid sync for production).composer require guzzlehttp/guzzle:^6.5 bpolaszek/bentools-pusher.ext-curl and ext-json are enabled.pushes and push_subscriptions tables..env (e.g., GCM_API_KEY=...).AppServiceProvider:
public function register() {
$this->app->bind(GCMHandler::class, fn() => new GCMHandler(config('services.gcm.key')));
}
SendWebPushJob:
How can I help you explore Laravel packages today?