Download the PHP package laravel-notification-channels/pushwoosh without Composer

On this page you can find all versions of the php package laravel-notification-channels/pushwoosh. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pushwoosh

Pushwoosh notification channel for Laravel

Build status Downloads Latest release Code coverage License

This package makes sending notifications using Pushwoosh a breeze.

Contents

Requirements

This make use of this package you need:

Installation

To install this package run the following command:

Next, add the following lines to your config/services.php:

You can now add the PUSHWOOSH_APP_CODE (found here) and the PUSHWOOSH_TOKEN (found here) to your environment file.

Usage

Using this package, you can use Pushwoosh just like any other notification channel within Laravel. For more information about Laravel's notification system, see the official documentation.

Note that before you can start sending pushes you must first register users to your application using one of Pushwoosh's SDKs.

Routing notifications

In order for Pushwoosh to know to what devices it needs to send to, you will need to add the routeNotificationForPushwoosh to your notifiable model(s), for example:

The routeNotificationForPushwoosh method may return a string, an array of strings or a PushwooshRecipient instance. For more information about the PushwooshRecipient class refer to the available methods section.

Sending notifications

Sending a pushwoosh message is easy, add pushwoosh to your notification's via method and implement the toPushwoosh method, for example:

The toPushwoosh method may return a string or an instance of the PushwooshMessage class, for more information on the PushwooshMessage class refer to the available methods section.

You can then send a push to one user:

Or to multiple users:

Unknown devices

When you reference devices that do not exist (anymore), a NotificationChannels\Pushwoosh\Events\UnknownDevices event will be dispatched.

You can easily hook into this event like so:

Available methods

This section details the public API of this package.

PushwooshMessage

Below is a list of available methods on the PushwooshMessage class.

Method Description
campaign($campaign) Set the Pushwoosh campaign code
content($content[, $language]) Set the message content (optionally for a specific language)
deliverAt($when[, $timezone]) Set the delivery moment
identifier($identifier) Set the Pushwoosh unique identifier (defaults to the notification ID)
preset($preset) Set the Pushwoosh preset code
throttle($limit) Throttle the rollout (100-1000 pushes per second)
title($title) Set the message title (only on Chrome, Firefox, iOS and Safari)
url($url[, $shorten]) Set the URL the message should link to
useRecipientTimezone() Respect the recipients' timezone when delivering the message
with($key, $value[, $platform]) Add a root level parameter.

PushwooshRecipient

Below is a list of available methods on the PushwooshRecipient class.

Method Description
device($device[, ...]) Limit the delivery to the given device(s)
platform($platform[, ...]) Limit the delivery to the given platform(s)
user($user[, ...]) Limit the delivery to the given user(s)
within($lat, $lng, $range) Limit the delivery to the given geo zone
Platforms

Below is a list of supported platforms, for the PushwooshRecipient::platform method.

Changelog

Please see the changelog for more information on what has changed recently.

Testing

Contributing

If you want to contribute to this package, take a look at the contribution guide.

Credits

License

This product is licensed under the MIT License (MIT). Please see the License File for more information.


All versions of pushwoosh with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
ext-json Version *
guzzlehttp/guzzle Version ^6.2 || ^7.0
guzzlehttp/psr7 Version ^1.0 || ^2.0
laravel/framework Version ^5.5 || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0 || ^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laravel-notification-channels/pushwoosh contains the following files

Loading the files please wait ....