Download the PHP package jeremykenedy/slack-laravel without Composer
On this page you can find all versions of the php package jeremykenedy/slack-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jeremykenedy/slack-laravel
More information about jeremykenedy/slack-laravel
Files in jeremykenedy/slack-laravel
Package slack-laravel
Short Description Laravel integration for the jeremykenedy/slack package, including facades and service providers.
License MIT
Informations about the package slack-laravel
Slack for Laravel
Laravel integration for the Slack, including facades and service providers. This package allows you to use Slack for PHP easily and elegantly in your Laravel app.
- Slack for Laravel
- Requirements
- Installation
- 1. From your projects root folder in terminal run:
- 2a. Register App (Laravel 5.5 +)
- 2b. Register App (Laravel 5.4 and below)
- 3. Register App Alias (Laravel 5.4 and below)
- 4. Publish Assets (All)
- 5. Create Webhook (All)
- 6. Configure
.env
(All)
- Configuration
- Usage
- 1. Include Class
- 2. Trigging Slack Messages
- Send to Default Channel
- Send to Different Channel
- Send to Private Message
- Faking in tests
- Credits
- License
Requirements
Installation
1. From your projects root folder in terminal run:
2a. Register App (Laravel 5.5 +)
Uses package auto discovery feature, no need to edit the config/app.php
file.
- Skip to 4. Publish Assets
2b. Register App (Laravel 5.4 and below)
Register the package with laravel in config/app.php
under providers
with the following:
3. Register App Alias (Laravel 5.4 and below)
Register the package with laravel in config/app.php
under aliases
with the following:
4. Publish Assets (All)
Publish the config file from your projects root folder in terminal by running:
5. Create Webhook (All)
Create an incoming webhook for each Slack team you'd like to send messages to. You'll need the webhook URL(s) in order to configure this package.
6. Configure .env
(All)
Configure Slack for Laravel in your .env
file by adding and editing the following:
Configuration
The config file comes with defaults and placeholders. Configure at least one team and any defaults you'd like to change.
Default configurations are published into config/slack.php
and the values can be set in the .env
file like so:
Usage
1. Include Class
- Use the facade anywhere:
2. Trigging Slack Messages
Send to Default Channel
- Send a message to the default channel
Send to Different Channel
- Send a message to a different channel
Send to Private Message
- Send a message to a private channel
Faking in tests
Use the fake
method on the Facade
This provides the following
Credits
- Most development credit must go to maknz.
- This package was forked and improved. The original package states that it was no longer maintained.
- This package was forked and modified to be compliant with MIT licencing standards for production use.
License
Slack for Laravel is licensed under the MIT license for both personal and commercial products. Enjoy!