Download the PHP package beyondcode/slack-notification-channel without Composer

On this page you can find all versions of the php package beyondcode/slack-notification-channel. 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 slack-notification-channel

Laravel Slack API Token Notification Channel

Latest Version on Packagist GitHub Workflow Status Quality Score Total Downloads

This is the Laravel Slack notification channel, but instead of using incoming webhooks, this channel makes use of OAuth access tokens. It also allows replies to thread messages.

https://phppackagedevelopment.com

If you want to learn how to create reusable PHP packages yourself, take a look at my upcoming PHP Package Development video course.

Usage

Install the package via composer:

The service provider gets registered automatically and you can use this package as a replacement of the core Laravel Slack notification channel.

Notification Routing

Since this notification channel makes use of Slack API tokens instead of incoming webhook URLs, you need to return an array containing the API token and an optional channel. This channel will be used, if it is not provided in the SlackMessage that you send:

Replying to Message Threads

Assuming you want to keep track of orders and have your team/bot respond to a single thread of per order placed, this channel allows you to retrieve the API response from the chat.postMessage method inside your notifications. With this you could post messages on order paid, shipped, closed, etc. events to the same thread.

In your order placed event you can have

And in your order paid event you can have

Customizing the channel name

Laravel ships with a slack notification channel which uses web hooks. This packages overwrites that default slack channel.

Should you want to use Laravel's default Slack channel and this one inside one app, you'll need to use a different channel name.

You can set the channel name using

Make sure you use the right method name on your notifications.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of slack-notification-channel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3.0|^8.0|^8.1
guzzlehttp/guzzle Version ^6.0|^7.0
illuminate/notifications Version ^6.0|^7.0|^8.0|^9.0|^10.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 beyondcode/slack-notification-channel contains the following files

Loading the files please wait ....