Skip to content

Latest commit

 

History

History
50 lines (32 loc) · 1007 Bytes

README.md

File metadata and controls

50 lines (32 loc) · 1007 Bytes

Laravel Log to Slack Channel

via incoming callback - https://api.slack.com/incoming-webhooks

2018-09-03 5 22 26

Installation

$ composer require maras0830/laravel-LogSlack

in config/app.php

    'providers' => [
    	...
        Maras0830\LogSlack\Providers\LogSlackBotServiceProvider::class,
    ];		

.env

SLACK_LOG_LEVEL=success,warning,error
SLACK_LOG_CALLBACK_URL=<slack_incoming_callback_url>

if your laravel version >= 5.8, install laravel/slack-notification-channel

$ composer require laravel/slack-notification-channel

Example

in route/web.php

Route::get('slack', function() {

    Log::debug('Slack Log ', ['Slack' => 'Hello']);
});

call http://localhost/slack

2018-09-03 5 23 16