Download the PHP package syedaunn/laravel-slack-output without Composer

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

Laravel SlackOutput

Sends messages to Slack with your Laravel application.

This package provides:

Requirements

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

You need to include the service provider and the facade in your Laravel app.

Add the service provider to the providers array in config/app.php:

and then add the facade to your aliases array:

Publish the configuration file with:

You need to add the webhook URL to the configuration file in order for the package to post to Slack. Create an incoming webhook on your Slack account. Copy the webhook url and open config/slack-output.php and set the webhook url to endpoint.

If null is set for any, the package will fall back on the default settings set by the webhook.

Usage

Post Command

The command slack:post posts message to Slack. It can take as arguments:

You can find information about the attach argument here: https://api.slack.com/docs/attachments

You can call it by the running the command:

You can also call it in your Laravel app:

Note the Artisan::queue, the command will be executed in background and will not block the current request.

Stats command

The command slack:stats send useful stats about your app to slack.

You need to configure this command by setting in config/slack-output.php the Eloquent classes and dates you prefer.

You can add constraints to the classes to limit the number of counted data.

The dates array is the form 'name of the date' => Carbon::instance(). Like:

To schedule this command every day, simple add to app/Console/Kernel.php:

Exceptions handler

To report useful exception to Slack, open app/Exceptions/Handler.php, and transform it like:

This will only reports exceptions that are not in the $dontReport array in the same file.

Failed jobs handler

To report failed jobs to Slack, open app/Providers/AppServiceProvider.php, and transform it like:

Scheduled commands reporting

To report the output of scheduled commands to Slack, open app/Console/Kernel.php, and transform it like:

Contributing

If you have problems, found a bug or have a feature suggestion, please add an issue on GitHub. Pull requests are also welcomed!

License

This package is open-sourced software licensed under the MIT license


All versions of laravel-slack-output with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
maknz/slack Version ~1.7
illuminate/support Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*
illuminate/console Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*
illuminate/queue Version 5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|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 syedaunn/laravel-slack-output contains the following files

Loading the files please wait ....