Package Data | |
---|---|
Maintainer Username: | LFelin |
Maintainer Contact: | felin.ludovic@gmail.com (Ludovic Felin) |
Package Create Date: | 2016-07-01 |
Package Last Update: | 2016-07-14 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-23 03:20:15 |
Package Statistics | |
---|---|
Total Downloads: | 32 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Trace to slack is a simple package for laravel to notify the errors of your application in slack https://slack.com/
Pull this package in through Composer.
{
"require": {
"lfelin/laravel-tracetoslack": "1.*"
}
}
Dump your autoload
composer dump-autoload -o
Add the service provider to your config/app.php
file:
'providers' => array(
//...
Lfelin\TraceToSlack\TraceToSlackServiceProvider::class,
),
In your app/Exceptions/Handler.php
file:
Replace
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
by
use Lfelin\TraceToSlack\Handler as ExceptionHandler;
Publish configuration
php artisan vendor:publish
In your config/tracetoslack.php
file configure the parameters. The parameter webhook_url is required :
return array(
/*
|--------------------------------------------------------------------------
| Notify on debug
|--------------------------------------------------------------------------
| Default: false
| The notifications are also sent if the debug mode is activated [true]
|
*/
'active_on_debug' => false,
/*
|--------------------------------------------------------------------------
| Your private Webhook URL
|--------------------------------------------------------------------------
| [Required]
| Eg: https://hooks.slack.com/services/XXX/XXX
|
*/
'webhook_url' => 'https://hooks.slack.com/services/XXX/XXX',
/*
|--------------------------------------------------------------------------
| Username
|--------------------------------------------------------------------------
| [Optional]
| Default: John Bot
|
*/
'username' => '',
/*
|--------------------------------------------------------------------------
| Emoji
|--------------------------------------------------------------------------
| [Optional]
| Default: ':warning:'
| http://www.emoji-cheat-sheet.com/ for example
|
*/
'icon_emoji' => '', // default: ':bug:' => http://www.emoji-cheat-sheet.com/
/*
|--------------------------------------------------------------------------
| Emoji Url
|--------------------------------------------------------------------------
| [Optional]
| This param increase icon_emoji
| https://slack.com/img/icons/app-57.png for example
|
*/
'icon_url' => '',
/*
|--------------------------------------------------------------------------
| Other Channel
|--------------------------------------------------------------------------
| [Optional]
| Default: The default channel is the one set in the web Hook
| This name start by '#' or '@' for Direct Message
| Eg: #general - @username
|
*/
'other_channel' => '',
);
Create a new webhook : https://my.slack.com/services/new/incoming-webhook/
Documentation : https://api.slack.com/custom-integrations
Use github issues to suggest improvements or reassembling your problems