{"id":15190159,"url":"https://github.com/larasoft-io/pusher-mobile-notifications","last_synced_at":"2026-03-05T01:01:54.301Z","repository":{"id":57011818,"uuid":"104443092","full_name":"larasoft-io/pusher-mobile-notifications","owner":"larasoft-io","description":null,"archived":false,"fork":false,"pushed_at":"2020-01-06T13:14:35.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T23:10:09.297Z","etag":null,"topics":["ios","laravel","laravel-5-package","laravel-framework","laravel5","laravel55","notifications","notifications-plugin","pusher"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/larasoft-io.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-22T07:06:53.000Z","updated_at":"2020-01-06T13:14:37.000Z","dependencies_parsed_at":"2022-08-21T13:40:45.591Z","dependency_job_id":null,"html_url":"https://github.com/larasoft-io/pusher-mobile-notifications","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/larasoft-io/pusher-mobile-notifications","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larasoft-io%2Fpusher-mobile-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larasoft-io%2Fpusher-mobile-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larasoft-io%2Fpusher-mobile-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larasoft-io%2Fpusher-mobile-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larasoft-io","download_url":"https://codeload.github.com/larasoft-io/pusher-mobile-notifications/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larasoft-io%2Fpusher-mobile-notifications/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30104218,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T00:38:46.881Z","status":"ssl_error","status_checked_at":"2026-03-05T00:38:45.829Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","laravel","laravel-5-package","laravel-framework","laravel5","laravel55","notifications","notifications-plugin","pusher"],"created_at":"2024-09-27T20:05:18.894Z","updated_at":"2026-03-05T01:01:54.239Z","avatar_url":"https://github.com/larasoft-io.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pusher push notifications channel for Laravel 5.3.* | 5.4.* | 5.5.*\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/laravel-notification-channels/pusher-push-notifications.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://img.shields.io/travis/laravel-notification-channels/pusher-push-notifications/master.svg?style=flat-square)](https://travis-ci.org/laravel-notification-channels/pusher-push-notifications)\n[![StyleCI](https://styleci.io/repos/65379321/shield)](https://styleci.io/repos/65379321)\n[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/9015691f-130d-4fca-8710-72a010abc684.svg?style=flat-square)](https://insight.sensiolabs.com/projects/9015691f-130d-4fca-8710-72a010abc684)\n[![Quality Score](https://img.shields.io/scrutinizer/g/laravel-notification-channels/pusher-push-notifications.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications)\n[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/laravel-notification-channels/pusher-push-notifications/master.svg?style=flat-square)](https://scrutinizer-ci.com/g/laravel-notification-channels/pusher-push-notifications/?branch=master)\n[![Total Downloads](https://img.shields.io/packagist/dt/laravel-notification-channels/pusher-push-notifications.svg?style=flat-square)](https://packagist.org/packages/laravel-notification-channels/pusher-push-notifications)\n\nThis package makes it easy to send [Pusher push notifications](https://pusher.com/docs/push_notifications) with Laravel 5.3.* | 5.4.* | 5.5.* | 6.0.*\n\n## Contents\n\n- [Installation](#installation)\n\t- [Setting up your Pusher account](#setting-up-your-pusher-account)\n- [Usage](#usage)\n\t- [Available Message methods](#available-message-methods)\n- [Changelog](#changelog)\n- [Testing](#testing)\n- [Security](#security)\n- [Contributing](#contributing)\n- [Credits](#credits)\n- [License](#license)\n\n\n## Installation\n\nYou can install the package via composer:\n\n``` bash\ncomposer require larasoft-io/pusher-mobile-notifications\n```\n\nYou must install the service provider:\n\n```php\n// config/app.php\n'providers' =\u003e [\n    ...\n    Larasoft\\PusherPushNotifications\\PusherPushNotificationsServiceProvider::class,\n],\n```\n\n### Setting up your Pusher account\n\nBefore using this package you should set up a Pusher account. Here are the steps required.\n\n- Login to https://dashboard.pusher.com/\n- Select your app from the sidebar or create a new app.\n- Click on the \"Push Notifications\" tab.\n- Upload your APNS Certificate or add your GCM API key.\n- Now select the \"App Keys\" tab.\n- Copy your `app_id`, `key`, and `secret`.\n- Update the values in your `config/broadcasting.php` file under the pusher connection.\n- You're now good to go.\n\n## Usage\n\nNow you can use the channel in your `via()` method inside the Notification class.\n\n``` php\nuse Larasoft\\PusherPushNotifications\\PusherChannel;\nuse Larasoft\\PusherPushNotifications\\PusherMessage;\nuse Illuminate\\Notifications\\Notification;\n\nclass AccountApproved extends Notification\n{\n    public function via($notifiable)\n    {\n        return [PusherChannel::class];\n    }\n\n    public function toPushNotification($notifiable)\n    {\n        return PusherMessage::create()\n            -\u003eiOS()\n            -\u003ebadge(1)\n            -\u003esound('success')\n            -\u003ebody(\"Your {$notifiable-\u003eservice} account was approved!\");\n    }\n}\n```\n\n### Available Message methods\n\n- `platform('')`: Accepts a string value of `iOS` or `Android`.\n- `iOS()`: Sets the platform value to iOS.\n- `android()`: Sets the platform value to Android.\n- `title('')`: Accepts a string value for the title.\n- `body('')`: Accepts a string value for the body.\n- `sound('')`: Accepts a string value for the notification sound file. Notice that if you leave blank the default sound value will be `default`.\n- `icon('')`: Accepts a string value for the icon file. (Android Only)\n- `badge(1)`: Accepts an integer value for the badge. (iOS Only)\n- `setOption($key, $value)`: Allows you to set any value in the message payload. For more information [check here for iOS](https://pusher.com/docs/push_notifications/ios/server), [or here for Android](https://pusher.com/docs/push_notifications/android/server).\n\n### Sending to multiple platforms\n\nYou can send a single message to an iOS device and an Android device at the same time using the `withiOS()` and `withAndroid()` method:\n\n```php\npublic function toPushNotification($notifiable)\n{\n    $message = \"Your {$notifiable-\u003eservice} account was approved!\";\n\n    return PusherMessage::create()\n        -\u003eiOS()\n        -\u003ebadge(1)\n        -\u003ebody($message)\n        -\u003ewithAndroid(\n            PusherMessage::create()\n                -\u003etitle($message)\n                -\u003eicon('icon')\n        );\n}\n```\n\n\u003e - Notice that iOS is the default platform, which means you don't have to call `-\u003eiOS()`.\n\u003e - When using `withAndroid()` or `withiOS()` you don't have to define the platform, it's done behind the scenes for you.\n\n### Routing a message\n\nBy default the pusher \"interest\" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`, however you can change this behaviour by including a `routeNotificationForPusherPushNotifications()` in the notifiable class method that returns the interest name.\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Testing\n\n``` bash\n$ composer test\n```\n\n## Security\n\nIf you discover any security related issues, please email themsaid@gmail.com instead of using the issue tracker.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Credits\n\n- [Mohamed Said](https://github.com/themsaid)\n- [Marcel Pociot](https://github.com/mpociot)\n- [Freek Van der Herten](https://github.com/freekmurze)\n- [Sebastian De Deyne](https://github.com/sebastiandedeyne)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarasoft-io%2Fpusher-mobile-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarasoft-io%2Fpusher-mobile-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarasoft-io%2Fpusher-mobile-notifications/lists"}