Download the PHP package joelhinz/laravel-quick-slack without Composer

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

Laravel QuickSlack

A simple package to quickly send messages to Slack channels through Laravel. Tested with Laravel 5.4 through 8.

Installation

Use Composer to install the package:

This package supports auto-discovery, so if you're using Laravel 5.5, you're all set.

For Laravel 5.4, or if you don't want to use auto-discovery, add the provider and optionally the facade alias to your config/app.php file:

Basic usage

Before sending messages, all you need to do is go to Slack and create an incoming webhook, then copy the webhook url.

The webhook url can be remembered for subsequent calls during the same script execution by passing a boolean as the second argument to the to() method:

Since QuickSlack is fluent, you can just keep chaining more messages if you want to. Please note that this requires a remembered webhook url, or a default webhook (see configuration options below).

Don't like how long the webhook urls get? No worries, you can just skip the first part of them. Instead of https://hooks.slack.com/services/[rest of url], just enter everything after services/ instead. QuickSlack will handle the rest automatically.

Configuration

QuickSlack can be used without any configuration, but you can export the configuration to get features such as a default webhook and named webhooks.

This will create a file config/quick-slack.php where you can set your configuration options as follows:

Again, you can enter either full urls or just the webhook-specific part of them.

By using named webhooks, you don't have to remember their full addresses when you send messages:

If you only or mainly send to just one endpoint, you can put that as the default and omit the to() method. The default value can be overwritten by using the to() method, and the overwriting url can be remembered as per above.

Webhook names are recursive, so that you can use different names for the same endpoint:

They are also nestable if you prefer to organise things that way:

Webhook precedence

When sending a message, QuickSlack will determine which endpoint to use in the following order of precedence:

  1. The webhook given in the last to() call if no message has been sent since then.
  2. The webhook given in the last to() call if the remember option is set to true.
  3. The default webhook in the configuration file.

TODO

Planned functionality includes

License

Standard MIT License (MIT), available in LICENSE.


All versions of laravel-quick-slack with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^7.0
laravel/framework Version ^9.1
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 joelhinz/laravel-quick-slack contains the following files

Loading the files please wait ....