1- # Pusher Beams push notifications channel for Laravel 5.5+, 6.x, 7.x & 8 .x
1+ # Pusher Beams push notifications channel for Laravel 8.x & 9 .x
22
33[ ![ 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 )
44[ ![ Software License] ( https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square )] ( LICENSE.md )
@@ -17,7 +17,7 @@ Also please note that prior to version 2.0, this package integrated with Pusher'
1717
1818## Contents
1919
20- - [ Pusher Beams push notifications channel for Laravel 5.5+, 6.x, 7.x & 8 .x] ( #pusher-beams-push-notifications-channel-for-laravel-55-6x-7x--8x )
20+ - [ Pusher Beams push notifications channel for Laravel 8.x & 9 .x] ( #pusher-beams-push-notifications-channel-for-laravel-55-6x-7x--8x )
2121 - [ Contents] ( #contents )
2222 - [ Installation] ( #installation )
2323 - [ Setting up your Pusher account] ( #setting-up-your-pusher-account )
@@ -38,7 +38,7 @@ Also please note that prior to version 2.0, this package integrated with Pusher'
3838
3939You can install the package via composer:
4040
41- ``` bash
41+ ``` bash
4242composer require laravel-notification-channels/pusher-push-notifications
4343```
4444
@@ -51,7 +51,7 @@ Before using this package you should set up a Pusher Beams account. Here are the
5151- Select your instance from the list or create a new instance.
5252- Click on the "Settings" tab.
5353- Upload your APNS Certificate and/or add your FCM Server key.
54- - Now select the "Credentials " tab.
54+ - Now select the "Keys " tab.
5555- Copy your ` Instance Id ` , and ` Secret Key ` .
5656- Add a new entry to in your ` config/services.php ` file:
5757 ``` php
@@ -66,7 +66,7 @@ Before using this package you should set up a Pusher Beams account. Here are the
6666
6767Now you can use the channel in your ` via() ` method inside the Notification class.
6868
69- ``` php
69+ ``` php
7070use NotificationChannels\PusherPushNotifications\PusherChannel;
7171use NotificationChannels\PusherPushNotifications\PusherMessage;
7272use Illuminate\Notifications\Notification;
@@ -132,18 +132,12 @@ public function toPushNotification($notifiable)
132132By default, the pusher "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example ` App.User.1 ` ,
133133however you can change this behaviour by including a ` routeNotificationFor() ` in the notifiable class.
134134
135- I.e. if you are pushing notification on `` User `` model, you can go to ` App\User ` class and implement method:
135+ I.e. if you are pushing notification on ` User ` model, you can go to ` App\Models \User ` class and implement method:
136136
137- ```
138- public function routeNotificationFor($channel)
137+ ``` php
138+ public function routeNotificationForPusherPushNotifications($notification): string
139139{
140- if($channel === 'PusherPushNotifications'){
141- return 'your.custom.interest.string';
142- }
143-
144- $class = str_replace('\\', '.', get_class($this));
145-
146- return $class.'.'.$this->getKey();
140+ return 'your.custom.interest.string';
147141}
148142```
149143
@@ -168,7 +162,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recen
168162
169163## Testing
170164
171- ``` bash
165+ ``` bash
172166$ composer test
173167```
174168
0 commit comments