Download the PHP package barnsleyhq/laravel-simplepush-notification-channel without Composer
On this page you can find all versions of the php package barnsleyhq/laravel-simplepush-notification-channel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download barnsleyhq/laravel-simplepush-notification-channel
More information about barnsleyhq/laravel-simplepush-notification-channel
Files in barnsleyhq/laravel-simplepush-notification-channel
Package laravel-simplepush-notification-channel
Short Description A SimplePush Laravel Notification Channel
License MIT
Informations about the package laravel-simplepush-notification-channel
Laravel SimplePush Notification Channel
This package gives you all the basic elements you need to send notifications to notifiable models via SimplePush.
Setup
Install the package using composer:
Laravel Usage
Once installed, all you need to do is setup your notifications to send to the SimplePush channel:
API
BarnsleyHQ\SimplePush\Models\SimplePushMessage
Required
token(string): SimplePushMessage
The token to be used when sending the notification.
Example:
content(string): SimplePushMessage
The message content to be included in the notification.
Example:
Optional
title(string): SimplePushMessage
The title of the notification.
Example:
event(string): SimplePushMessage
An event to trigger once the notification is sent.
Example:
actions(FeedbackActions|GetActions): SimplePushMessage
Actions to be sent along with the event.
Feedback Actions Example:
GET Actions Example:
BarnsleyHQ\SimplePush\Models\Actions\FeedbackActions
make(string|array $action, null|callable $sendCallback = null): FeedbackActions
Create new instance of FeedbackActions with an initial action.
Example:
getFeedbackResponseForId(string $feedbackId, ?\GuzzleHttp\Client $httpClient): array|null
Check message for feedback response.
Example:
add(string|array $action): FeedbackActions
Add another action to an existing instance of FeedbackActions.
Example:
sendCallback(null|callable $sendCallback): FeedbackActions
Update callback to retrieve Feedback ID for an existing instance of FeedbackActions.
Example:
toArray: array
Return FeedbackAction options as an array.
Example:
BarnsleyHQ\SimplePush\Models\Actions\GetActions
make(GetAction $action): GetActions
Create new instance of GetActions with an initial action.
Example:
add(GetAction|array $action): GetActions
Add another action to an existing instance of GetActions.
Example:
addAction(string $name, string $url): GetActions
Add another action, with just the required values, to an existing instance of GetActions.
Example:
toArray: array
Return GetActions options as an array.
Example:
BarnsleyHQ\SimplePush\Models\Actions\GetAction
make(string $name, string $url): GetAction
Create new instance of GetAction with initial values.
Example:
setName(string $name): GetAction
Set the name of the action.
Example:
setUrl(string $url): GetAction
Set the URL for the action.
Example:
toArray: array
Return GetAction options as an array.
Example:
BarnsleyHQ\SimplePush\Models\Attachments\GenericAttachments
Allowed Extensions
- jpg
- png
- gif
- mp4
make(string|array $attachment): GenericAttachments
Create new instance of GenericAttachments with an initial attachment.
Example:
add(string|array $action): GenericAttachments
Add another action to an existing instance of GenericAttachments.
Example:
toArray: array
Return FeedbackAction options as an array.
Example:
BarnsleyHQ\SimplePush\Models\Attachments\StreamAttachment
make(string $streamUrl): StreamAttachment
Create new instance of StreamAttachment with initial values.
Example:
setStreamUrl(string $streamUrl): StreamAttachment
Set the name of the action.
Example:
toArray: array
Return StreamAttachment options as an array.
Example:
BarnsleyHQ\SimplePush\Models\Attachments\VideoAttachment
make(string $thumbnailUrl, string $videoUrl): VideoAttachment
Create new instance of VideoAttachment with initial values.
Example:
setThumbnailUrl(string $thumbnailUrl): VideoAttachment
Set the thumbnail URL of the attachment.
Example:
setVideoUrl(string $videoUrl): VideoAttachment
Set the video URL of the attachment.
Example:
toArray: array
Return VideoAttachment options as an array.
Example:
Base PHP Usage
While this is built for Laravel, it's possible to use without.
Testing
For basic testing, run:
Or for testing code coverage:
Security
If you discover any security vulnerabilities, please email [email protected] instead of submitting an issue.
License
The MIT License (MIT). Please see License File for more information.