PHPackages                             pharmit/push - 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. pharmit/push

ActiveLibrary

pharmit/push
============

A push library for Laravel for both Google and Apple

1.0.6(7y ago)62.2k4[1 PRs](https://github.com/PharmIT/Push/pulls)PHPPHP &gt;=5.5.0

Since Mar 16Pushed 7y ago3 watchersCompare

[ Source](https://github.com/PharmIT/Push)[ Packagist](https://packagist.org/packages/pharmit/push)[ RSS](/packages/pharmit-push/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (7)Dependencies (4)Versions (8)Used By (0)

Laravel Push
============

[](#laravel-push)

This package provides a Push service for both iOS and Android. It implements the iOS APS 2.0 (HTTP2) API, which requires a version of cURL with HTTP2 enabled. Contrary to other packages, this package can give feedback on failed push tokens.

Installation
============

[](#installation)

To install the package, run the composer command:

`composer require pharmit/push`

Open `app.php` from your config directory and add to the providers array: `'PharmIT\Push\PushServiceProvider',`

And add to the alias array: `'Push' => 'PharmIT\Push\PushServiceFacade',`

Then publish the configuration by executing: `php artisan vendor:publish`

Server settings
---------------

[](#server-settings)

Since the new Apple APS API uses HTTP2 and support for HTTP2 is not good, make sure you have a cURL compiled with HTTP2 support. This has been fully implemented in cURL version 7.43.0 and up. However cURL needs to be specifically compiled with this feature. When the used cURL does not have support for HTTP2, it will throw an (odd) SSL error when trying to send a push message.

Configuration
=============

[](#configuration)

The package contains a configuration file called, "push.php". Listed below are the configuration settings.

#### throwExceptionOnError

[](#throwexceptiononerror)

When this variable is set to true all errors will throw an exception. Otherwise it will return the variable false. Defaults to true.

#### defaultEnvironment

[](#defaultenvironment)

This option controls which environment is selected by default, note that it falls back to this option when either the selected options cannot be cannot be found or is not present. When even the default environment cannot be found an exception will be thrown unless `throwExceptionOnError` is set to false.

#### apple

[](#apple)

This array contains all configuration options for APS.

###### certificate

[](#certificate)

The path to the certificate relative to project root

###### environment

[](#environment)

Either "production" or "development" determines which environment will be used when contacting Apple

###### passphrase

[](#passphrase)

The passphrase for the certificate (optional)

###### topic

[](#topic)

The application identifier, e.g. "nl.PharmIT.MedApp"

#### google

[](#google)

This array contains all configuration options for Google's GCM, which is currently just a single option.

###### apikey

[](#apikey)

The GCM API key

Usage
=====

[](#usage)

The following is a minimal code example for the Google API:

```
// Get an instance
$google = Push::getPushService('google')
            ->setMessageText('Hi, how are you?')
            ->addRecipient('')
            ->addRecipients(['','']);

// Get all push ID's to which the push message has been sent
$success = $google->send();

// Get all push ID's to which the push message could not be sent.
$failed = $google->getFailedRecipients();

```

For APS the exact same pattern can be used, but the parameter given to the `getPushService` call, has to be 'apple' instead of 'google'.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 50% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~143 days

Recently: every ~212 days

Total

7

Last Release

2852d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dd90cab491582157594563240fe12d010e1a6a950f86cd4c5ebb8f0abe673094?d=identicon)[tuupke](/maintainers/tuupke)

---

Top Contributors

[![tuupke](https://avatars.githubusercontent.com/u/2218324?v=4)](https://github.com/tuupke "tuupke (6 commits)")[![jszanto](https://avatars.githubusercontent.com/u/7968933?v=4)](https://github.com/jszanto "jszanto (3 commits)")[![nickygerritsen](https://avatars.githubusercontent.com/u/550145?v=4)](https://github.com/nickygerritsen "nickygerritsen (2 commits)")[![maartendemandt](https://avatars.githubusercontent.com/u/5443052?v=4)](https://github.com/maartendemandt "maartendemandt (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/pharmit-push/health.svg)

```
[![Health](https://phpackages.com/badges/pharmit-push/health.svg)](https://phpackages.com/packages/pharmit-push)
```

###  Alternatives

[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[spatie/laravel-export

Create a static site bundle from a Laravel app

646127.9k5](/packages/spatie-laravel-export)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
