PHPackages                             matriphe/gcm - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. matriphe/gcm

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

matriphe/gcm
============

Simple GCM push using Guzzle.

1.3(10y ago)2661[1 PRs](https://github.com/matriphe/gcm/pulls)MITPHPPHP &gt;=5.4.0

Since Jun 11Pushed 10y ago2 watchersCompare

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

READMEChangelog (1)Dependencies (3)Versions (5)Used By (0)

Simple GCM Push Notification
============================

[](#simple-gcm-push-notification)

Send GCM Push notification using Guzzle. Make sure you have the GCM Api key and could get Device ID and generate GCM ID.

Compatibility
-------------

[](#compatibility)

Works with Laravel 5.0.

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

[](#installation)

Open `composer.json` and require this line below.

```
"matriphe/gcm": "dev-master"
```

Or you can run this command from your project directory.

```
composer require "matriphe/gcm:dev-master"
```

### Laravel Installation

[](#laravel-installation)

Open the `config/app.php` and add this line in `providers` section.

```
'Matriphe\Gcm\GcmServiceProvider'
```

Still in `config/app.php`, add this line in `alias` section.

```
'Gcm' => 'Matriphe\Gcm\GcmFacade'
```

Publish Configuration
---------------------

[](#publish-configuration)

To control the configuration, you have to *publish* the configuration file.

```
php artisan vendor:publish
```

After running this command, there will be `config/gcm.php` and `resources/views/vendor/gcm/form.blade.php` files.

Please fill the `appKey` section in the `config/gcm.php`.

Usage
-----

[](#usage)

Just use the `push($device_id, $gcm_id, $subject, $message, $extras = [])` function and it will push the message to GCM.

The return of the function is **object**.

### Example

[](#example)

```
$device_id = '30C89D80C48E96AE';
$gcm_id = 'APA91bGfw8y8DG6CL1BOraVDJyYXUU82rwzbJjnR5PppIcSE7HYgQSvxiSHMJN7zYiCC9CLGNHLiWMxUD22JrlSmvMkaJiUgCsMOvHk0BPeWmvGJu4oHAa1KUm9D5ngdcFNNUwJQ7ttB6VW0F575rhQ2ow56ACM1Yg';
$subject = 'Test Push Subject';
$message = 'This is the message that will be shown in notification.';
$extras = [
    'id' => 21,
    'user' => 'motherfather',
];
Gcm::push($device_id, $gcm_id, $subject, $message, $extras = [])
```

### Output

[](#output)

```
stdClass Object
(
    [multicast_id] => 6100993858981303466
    [success] => 1
    [failure] => 0
    [canonical_ids] => 0
    [results] => Array
        (
            [0] => stdClass Object
                (
                    [message_id] => 0:1434034071184625%9747e1a6f9fd7ecd
                )

        )

)

```

Test
----

[](#test)

It has routes, so you can go to `/matriphe/gcm`on your URL and try to send the GCM notification.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

4

Last Release

3981d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/809de97d088b0eff358f96141a31bd8897216a03175448192de140f2723bdea6?d=identicon)[matriphe](/maintainers/matriphe)

---

Top Contributors

[![matriphe](https://avatars.githubusercontent.com/u/277262?v=4)](https://github.com/matriphe "matriphe (25 commits)")

---

Tags

laravelGuzzlepushnotificationgcmandroid

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matriphe-gcm/health.svg)

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

###  Alternatives

[edujugon/push-notification

Laravel Package to send push notifications to Android and IOS devices. (GCM,FCM,APN)

4891.4M1](/packages/edujugon-push-notification)[kozz/laravel-guzzle-provider

Guzzle 5/6 Service Provider for Laravel

621.1M2](/packages/kozz-laravel-guzzle-provider)[onlime/laravel-http-client-global-logger

A global logger for the Laravel HTTP Client

1935.1k](/packages/onlime-laravel-http-client-global-logger)

PHPackages © 2026

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