Download the PHP package eric-famiglietti/laravel-slack-events without Composer

On this page you can find all versions of the php package eric-famiglietti/laravel-slack-events. 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 laravel-slack-events

Laravel Slack Events

Packagist Travis StyleCI

Laravel package for integrating with the Slack Events API.

Introduction

This package makes it easy to set up a webhook in a Laravel application for receiving requests from Slack through the Slack Events API. The package handles token authentication and URL verification and leaves the specific handling of events up to you. Events can be handled through jobs or event listeners.

Before proceeding, it's recommended that you familiarize yourself with the Slack Events API and the available Event Types so you can properly set up Slack to communicate with your application.

Requirements

NOTE: These requirements are artificially high. The package could work with earlier versions of Laravel but has only been tested with Laravel 5.6.

Installation

Install the latest version using Composer:

Publish the configuration file using:

Usage

Setup

The package requires a SLACK_EVENTS_TOKEN environmental variable to be set. The Verification Token can be found by on your Slack application's dashboard (https://api.slack.com/apps/), under the App Credentials section.

For the purpose of this guide, the webhook URL that we will use is https://app.tld/slack/events.

First, create the webhook route using the route macro:

Next, add the route to the $except array of the VerifyCsrfToken middleware:

Once you have created the webhook, configure Slack to send event requests to the webhook. This is done on the Event Subscriptions page (https://api.slack.com/apps//event-subscriptions) of your Slack application's dashboard.

If your application is publically accessible, you will begin to event requests to the webhook. Events can be handled through jobs or event listeners.

Jobs

Jobs can be executed when events are triggered. For example, to dispatch a job when a reaction_added is received, add the following to config/slack-events.php:

Jobs will receive the event payload through their constructor:

Events

Laravel event listeners can handle Slack event requests. For example, to listen to a reaction_added event, add an element to the $listen property of your EventServiceProvider:

The associated event listener would look like:

Testing

Run the included tests using:

Credits

Special thanks to the ohdearapp/laravel-ohdear-webhooks package, which this package was heavily based on.

License

This package is provided under the MIT License (MIT). See the license file for more information.


All versions of laravel-slack-events with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
illuminate/http Version ^5.6
illuminate/routing Version ^5.6
illuminate/support Version ^5.6
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 eric-famiglietti/laravel-slack-events contains the following files

Loading the files please wait ...