PHP code example of lfelin / laravel-tracetoslack

1. Go to this page and download the library: Download lfelin/laravel-tracetoslack library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lfelin / laravel-tracetoslack example snippets



    'providers'     => array(

        //...
        Lfelin\TraceToSlack\TraceToSlackServiceProvider::class,

    ),


use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

use Lfelin\TraceToSlack\Handler as ExceptionHandler;


    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' => '',
    );


php artisan vendor:publish